X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/0f4bcee75353935ff9bc605f7e0b31d12e302605..5c5e66a1d3fdcd1b0562f928a07f526b6ec1244d:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index 5a4f355..e299423 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -1,6 +1,15 @@ +:0 +*$ DEST ?? ^$NULL$ +{ + LOG="deliver: sending message $MSGID to $DEST$NL" + + :0 + $NULL +} + :0 * ! DEST ?? . -{ DEST="$DEFAULT" } +{ DEST=/ } :0 * DEST ?? .+[^/]$ @@ -11,16 +20,14 @@ { DEST="$MATCH" } :0 -*$ DEST ?? ^\. -{ } - -:0 E +*$ ! DEST ?? ^\. { DEST=".$DEST" } -TRAP="DEST=\"\${LASTFOLDER#$BASE/}\"; - echo \"delivered: \$DEST\" >> '$THISLOGFILE'; - $TRAP" - -LOG="deliver: delivering message $MSGID to $DEST$NL" :0 -$BASE/$DEST +{ + LOG="deliver: delivering message $MSGID to $DEST$NL" + TRAP="$TRAP; echo \"delivered: \$DESTFILE\" >> '$THISLOGFILE'" + + :0 + $BASE/$DEST +}