X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/ec33cde8f8ecb3f68c805ce48b4d62838647a739..9551828cd214519a5c3b95c1d3747a0a4788a470:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index 928d52c..4417af6 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -1,23 +1,24 @@ -VERBOSE=yes :0 -*$ $DEST -{ - :0 - * DEST ?? .+[^/]$ - { DEST="$DEST/" } +* ! DEST ?? . +{ DEST=/ } - :0 E - *$ DEST ?? ^\. - { DEST="$BASE/$DEST" } +:0 +* DEST ?? .+[^/]$ +{ DEST="$DEST/" } + +:0 +*$ DEST ?? ^$BASE/\/.+ +{ DEST="$MATCH" } - LOG="deliver: delivering message $MSGID to $DEST$NL" - :0 - $DEST -} +:0 +*$ DEST ?? ^\. +{ } :0 E -{ - LOG="deliver: delivering message $MSGID to default destination$NL" - :0 - $DEFAULT -} +{ DEST=".$DEST" } + +TRAP="$TRAP; echo \"delivered: \$DESTFILE\" >> '$THISLOGFILE'" + +LOG="deliver: delivering message $MSGID to $DEST$NL" +:0 +$BASE/$DEST