From 438f84a0ab905eaa1539a5fd4c38353114f9c8f9 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 6 Feb 2026 17:25:24 +0900 Subject: [PATCH] Initial commit --- .procmailrc | 219 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 .procmailrc diff --git a/.procmailrc b/.procmailrc new file mode 100644 index 0000000..e4c38b1 --- /dev/null +++ b/.procmailrc @@ -0,0 +1,219 @@ +PATH=/bin:/usr/bin:/usr/local/bin + +MAILDIR=$HOME/Maildir/ +PMDIR=$MAILDIR +DEFAULT=$MAILDIR + +MONTH=`date +\%Y-\%m` +LOGFILE=$MAILDIR/procmail_logs/procmail.$MONTH.log +LOCKFILE=$HOME/.cache/lockmail + +# Enable this in times of hardship +# VERBOSE=yes + +# Let spamassassin take a look at what we got +:0fw +| /usr/local/bin/spamc + +############### +#### SPAM ##### +############### + +# Let's filter out some spam before we put things my inboxes + +:0: +* ^From:.*@mazamins\.uk +$MAILDIR.Spam/ + +:0: +* ^From:.*@daimlerhldg\.com +$MAILDIR.Spam/ + +:0: +* ^From:.*@nico\.jambyl\.su +$MAILDIR.Spam/ + +:0: +* ^From:.*@dns1\.densi\.jp +$MAILDIR.Spam/ + +:0: +* ^Subject: Sitte komfortabelt hvor som helst +$MAILDIR.Spam/ + +:0: +* ^Subject: TikTok Norway for adults +$MAILDIR.Spam/ + +:0: +* ^Subject: Ny beskjed +$MAILDIR.Spam/ + +:0: +* ^Subject: Viktig varsel +$MAILDIR.Spam/ + +:0: +* ^Subject: Derila Puten #1 i Norge +$MAILDIR.Spam/ + +:0: +* ^Subject: Nummer 1 blant kjøkkenkniver i verden +$MAILDIR.Spam/ + +:0: +* ^Subject: Innovativ PEEK non-stick belegg +$MAILDIR.Spam/ + +# Let's hear spamassassin's opinion on the matter + +:0 w +* ^X-Spam-Score:.*\+\+ +$MAILDIR.Spam/ + +:0 w +* ^X-Spam-Report:.*Status=Yes +$MAILDIR.Spam/ + +:0 w +* ^X-Spam-Flag:.*yes +$MAILDIR.Spam/ + +:0 +* ^X-.*MailScanner-SpamScore: ssss +$MAILDIR.Spam/ + +:0: +* ^X-Spam-Status: Yes +$MAILDIR.Spam/ + +# Stuff going to the ancient *.unit.no is usually spam +:0 w +* ^to.*unit\.no +$MAILDIR.Spam/ + +# This is definitely spam +:0 w +* ^X-Blacklist.* +$MAILDIR.Spam/ + +################### +#### AUTOMATED #### +################### + +:0: +* ^From: Certificate Services Manager +$MAILDIR.Automated.Drift.Certificates/ + +:0 +* ^Subject: Cron <[A-Za-z0-9_-]*@\/[A-Za-z0-9_-]* +{ + HOSTNAME=$MATCH + TARGET="$MAILDIR.Automated.Drift.Cron.$HOSTNAME/" + + :0 + * ? test -d "$TARGET" || mkdir -p "$TARGET" + { + :0: + $TARGET + } +} + +:0 +* ^X-Gitea-Repository-Path: \/.* +{ + OWNER=`printf "%s\n" "$MATCH" | cut -d/ -f1` + REPO=`printf "%s\n" "$MATCH" | cut -d/ -f2` + + TARGET="$MAILDIR.Automated.Gitea.$OWNER.$REPO/" + + :0 + * ? test -d "$TARGET" || mkdir -p "$TARGET" + { + :0: + $TARGET + } +} + +:0: +* ^From: Mail Delivery System $ +$MAILDIR.Automated.Drift."Mail Delivery System"/ + +:0: +* ^From: mdadm monitoring +$MAILDIR.Automated.Drift.Mdadm/ + +:0: +* ^From: root +* ^Subject: exim paniclog on .*\.pvv\.ntnu\.no has non-zero size +$MAILDIR.Automated.Drift.Paniclog/ + +:0: +* ^Subject: \*\*\* SECURITY information for [a-z]*\.pvv\.(ntnu\.no|org) \*\*\* +$MAILDIR.Automated.Drift.Sudo/ + +:0: +* ^From: aktive-bounces@pvv\.org +* ^To: aktive-owner@pvv\.org +$MAILDIR.Automated.Bounces/ + +:0: +* ^From: Kvotesystem +* ^Subject: PVV kvotebruk .* +$MAILDIR.Automated.Kvotesystem/ + +############# +#### HAM #### +############# + +### Drift + +:0: +* ^X-RT-Ticket: rtir.it.ntnu.no +* ^References:.*NTNU-CSIRT +$MAILDIR.Drift.SOC/ + +:0: +* ^To.*drift@.*pvv\.(ntnu\.no|org) +$MAILDIR.Drift/ + +:0: +* ^To.*hostmaster@.*pvv\.(ntnu\.no|org) +$MAILDIR.Drift/ + +:0: +* ^To.*cert@.*pvv\.(ntnu\.no|org) +$MAILDIR.Cert/ + +### Styret + +:0: +* ^To.*(styret|styre|pvv)@.*pvv\.(ntnu\.no|org) +$MAILDIR.Styret/ + +:0: +* ^To.*kasserer@pvv\.ntnu\.no +$MAILDIR.Styret/ + +### Misc + +:0: +* ^From.*@itemize\.no +$MAILDIR.Misc/ + +:0: +* Received: from io.kuis.kyoto-u.ac.jp +$MAILDIR.KyotoU/ + +####################### +### REST OF THE OWL ### +####################### + +:0: +* ^(Envelope-to|Delivered-To): oysteikt\+note +| formail -k -X From: -X Date: -X Subject: >> $NOTE/ + +:0 w +$MAILDIR + +# vim: filetype=procmail