:0
-* DEST ?? .
-{
- :0
- * DEST ?? .+[^/]$
- { DEST="$DEST/" }
+* ! DEST ?? .
+{ DEST="$DEFAULT" }
- :0
- *$ DEST ?? ^$BASE/\/.+
- { DEST="$MATCH" }
-
- :0
- *$ DEST ?? ^\.
- { }
+:0
+* DEST ?? .+[^/]$
+{ DEST="$DEST/" }
- :0 E
- { DEST=".$DEST" }
+:0
+*$ DEST ?? ^$BASE/\/.+
+{ DEST="$MATCH" }
- LOG="deliver: delivering message $MSGID to $DEST$NL"
- DEST="$BASE/$DEST"
- :0
- $DEST
-}
+:0
+*$ DEST ?? ^\.
+{ }
:0 E
-{
- LOG="deliver: delivering message $MSGID to default destination$NL"
- :0
- $DEFAULT
-}
+{ DEST=".$DEST" }
+
+TRAP="DEST=\"\${LASTFOLDER#$BASE/}\";
+ echo \"delivered: \$DEST\" >> '$THISLOGFILE';
+ $TRAP"
+
+LOG="deliver: delivering message $MSGID to $DEST$NL"
+:0
+$BASE/$DEST
{
LOG="spamfilter: filing as unsure$NL"
:0
- $BASE/.retrain.unsure/
+ { DEST=retrain.unsure }
}
:0 E
{
LOG="spamfilter: filing as disagreed$NL"
:0
- $BASE/.retrain.disagree/
+ { DEST=retrain.disagree }
}
:0 E
{
LOG="spamfilter: filing as spam$NL"
:0
- $BASE/.spam/
+ { DEST=spam }
}
:0
# send-hook '~C git@vger\.kernel\.org' 'unset followup_to'
#
:0
+* ! DEST ?? .
* ? echo "$EQ_TO" | $EGREP -qif $CONF/cclists
* ! ^Mail-Followup-To:
{
original-to: $ORIGINAL_TO
subject: $SUBJECT$NL"
-TRAP="DEST=\"\${LASTFOLDER#$BASE/}\";
- echo \"delivered: \$DEST\" >> '$THISLOGFILE';
- echo >> '$THISLOGFILE';
+TRAP="echo >> '$THISLOGFILE';
egrep -v '^XX(procmail:)?[[:space:]\"]' '$THISLOGFILE' >> $MASTERLOGFILE"
#VERBOSE=yes
INCLUDERC=$PMDIR/justme
-INCLUDERC=$PMDIR/spamtraps
-INCLUDERC=$PMDIR/spammers
INCLUDERC=$PMDIR/spamfilter
-INCLUDERC=$PMDIR/addheaders
-
INCLUDERC=$PMDIR/handlespam
#INCLUDERC=$PMDIR/autoreplies
INCLUDERC=$PMRULES/all
+INCLUDERC=$PMDIR/addheaders
INCLUDERC=$PMDIR/deliver
}
:0
- $BASE/.admin/
+ { DEST=admin }
# DESTDIR="$BASE/.admin.`echo $EQ_DOMAIN | tr . _"
#
-INCLUDERC=$PMRULES/feeds
-INCLUDERC=$PMRULES/admin
-INCLUDERC=$PMRULES/ul
-INCLUDERC=$PMRULES/debian
-INCLUDERC=$PMRULES/sudetia
-INCLUDERC=$PMRULES/mass
+:0
+* ! DEST ?? .
+{
+ INCLUDERC=$PMRULES/feeds
+ INCLUDERC=$PMRULES/admin
+ INCLUDERC=$PMRULES/ul
+ INCLUDERC=$PMRULES/debian
+ INCLUDERC=$PMRULES/sudetia
+ INCLUDERC=$PMRULES/mass
+}
# vim:ft=procmail
:0
* ^X-Debian-PR-Source: \/.+
* ? grep -q "^${MATCH}$" $CONF/debian-packages
-$BASE/.debian.$MATCH/
+{ DEST=debian.$MATCH }
:0
* ORIGINAL_TO ?? ^logcheck-(devel|commits)=lists\.alioth\.debian\.org@mass\.madduck\.net$
-$BASE/.debian.logcheck/
+{ DEST=debian.logcheck }
:0
* ORIGINAL_TO ?? ^pkg-mdadm-(devel|commits)=lists\.alioth\.debian\.org@mass\.madduck\.net$
-$BASE/.debian.mdadm/
+{ DEST=debian.mdadm }
:0
* ORIGINAL_TO ?? ^netconf-(devel|commits)=lists\.alioth\.debian\.org@mass\.madduck\.net$
-$BASE/.debian.netconf/
+{ DEST=debian.netconf }
:0
* ORIGINAL_TO ?? ^madduck=debian\.org@forward\.madduck\.net$
-$BASE/.debian/
+{ DEST=debian }
# vim:ft=procmail
:0
* ORIG_DOMAIN ?? ^r2e\.madduck\.net$
-{
- DESTDIR=$BASE/.feeds
-
- :0
- ${DESTDIR}/
-}
+{ DEST=feeds }
# vim:ft=procmail
:0
* ORIG_DOMAIN ?? ^mass\.madduck\.net$
-{
- DESTDIR=$BASE/.mass
-
- :0
- ${DESTDIR}/
-}
+{ DEST=mass }
# vim:ft=procmail
:0
* ORIGINAL_TO ?? ^m(artin\.)?krafft@sudetia\.de$
-$BASE/.sudetia/
+{ DEST=sudetia }
# vim:ft=procmail
RE_UL_DOMAIN
:0
- $BASE/.ul/
+ { DEST=ul }
}
# vim:ft=procmail
{ LOG="spamfilter: skipping resubmitted message$NL" }
}
+# do not run spamfilters if the message destination is already set
+:0 E
+* DEST ?? .
+{
+ LOG="spamfilter: message already routed to '$DEST'$NL"
+ SPAM_UNKNOWN=already-destined
+}
+
# let earlier parts of the mailfilter cause bypassing the checks
:0 E
* SKIP_SPAMCHECKS ?? .
# now run the spamfilters
:0 E
{
+ INCLUDERC=$PMDIR/spamtraps
+ INCLUDERC=$PMDIR/spammers
INCLUDERC=$PMDIR/pre-spam-cleanup
# crm114
:0
+* ! DEST ?? .
* ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$
* ORIGINAL_TO ?? ^\/[^@]+
{
{
LOG="gmail: archiving message $MSGID with gmail$NL"
SENDMAILFLAGS="$SENDMAILFLAGS -f $ID"
- TRAP=""
+ TRAP
:0
! martin.krafft@gmail.com