X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/406e0c358dbe50c3ff0463c12f3d9bcdccfaf5d2..fb6935a531ea488a68a6504c7ef85c9069189610:/procmail/defines diff --git a/procmail/defines b/procmail/defines index 2e8c1f5..9503524 100644 --- a/procmail/defines +++ b/procmail/defines @@ -25,6 +25,7 @@ PROCMAIL="$NICE /usr/bin/procmail -p $PMDIR/procmailrc" FORMAIL="$NICE /usr/bin/formail -f" EGREP="$NICE /bin/egrep" SED="$NICE /bin/sed" +BIN_DATE="/bin/date" DELIVER="$NICE /usr/lib/dovecot/deliver" CRM114="$NICE /usr/share/crm114/mailreaver.crm -u $MAILFILT/crm114/" @@ -36,9 +37,6 @@ TRAINER="$NICE $MAILFILT/bin/train" SQLITE="$NICE /usr/bin/sqlite3" -OURDATE="`date -R`" -OURDATE_SHORT=`date +%Y.%m.%d.%H.%M.%N` - BASE=$HOME/.maildir #DEFAULT="|$DELIVER" @@ -79,8 +77,23 @@ NULL=/dev/null DELAYED_QUEUE=$BASE/.delayed/ TICKLER_QUEUE=$BASE/.tickler/ DISCARD=$BASE/.discard/ +SPAM=$BASE/.spam/ #DISCARD="'|$DELIVER -m BASE.discard'" +DELAY_NEXT_WEEKEND='next sunday 28 hours ago' # fri night, 20:00 +DELAY_TONIGHT='tomorrow 00:00 4 hours ago' # tonight at 20:00 + +OURDATE="`$BIN_DATE +'%s %Y.%m.%d.%H.%M.%N %a, %d %b %Y %T %z'`" +:0 +*$ OURDATE ?? ^\/${RE_NOT_SPACE}+ +{ OURDATE_TS="$MATCH" } +:0 +*$ OURDATE ?? ^[0-9]+${RE_SPACE}+\/${RE_NOT_SPACE}+ +{ OURDATE_SHORT="$MATCH" } +:0 +*$ OURDATE ?? ^[0-9]+${RE_SPACE}+[0-9.]+${RE_SPACE}+\/.+ +{ OURDATE="$MATCH" } + ### variables from the message ### local recipient data