X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/67e1e81d0e60d4154ae0d2a34ee0e51a2a5f89c9..09d4ef213c4a6e5588c1944107a94da0ab44ee8c:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index e3db030..4417af6 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -1,30 +1,24 @@ -VERBOSE=yes :0 -*$ $DEST -{ - :0 - * DEST ?? .+[^/]$ - { DEST="$DEST/" } +* ! DEST ?? . +{ DEST=/ } - :0 - *$ DEST ?? ^$BASE/\. - { } - - :0 E - *$ DEST ?? ^\. - { DEST="$BASE/$DEST" } +:0 +* DEST ?? .+[^/]$ +{ DEST="$DEST/" } - :0 E - { DEST="$BASE/.$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