X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/097c75254f91531513cd2c9a43749e46b8d27e11..4d08a1263be6ae9cbc9800b42b266ec3549a0bb7:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index c3188ff..ca6bef4 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -1,30 +1,27 @@ :0 -* DEST ?? . -{ - :0 - * DEST ?? .+[^/]$ - { DEST="$DEST/" } - - :0 - *$ DEST ?? ^$BASE/\/.+ - { DEST="$MATCH" } +* ! DEST ?? . +{ DEST=/ } - :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 +{ DEST=".$DEST" } + +:0 { - LOG="deliver: delivering message $MSGID to default destination$NL" + LOG="deliver: delivering message $MSGID to $DEST$NL" + TRAP="$TRAP; echo \"delivered: \$DESTFILE\" >> '$THISLOGFILE'" + :0 - $DEFAULT + $BASE/$DEST }