X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/fa4ece019ddd60666d6b438c3d27d2e53f6c3d64..HEAD:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index ca6bef4..af2f70c 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -1,3 +1,12 @@ +:0 +*$ DEST ?? ^$NULL$ +{ + LOG="deliver: sending message $MSGID to $DEST$NL" + + :0 + $NULL +} + :0 * ! DEST ?? . { DEST=/ } @@ -11,12 +20,19 @@ { DEST="$MATCH" } :0 -*$ DEST ?? ^\. -{ } - -:0 E +*$ ! DEST ?? ^\. { DEST=".$DEST" } +:0 +* MARK_READ ?? . +{ + LOG="deliver: marking messages $MSGID as read because of $MARK_READ$NL" + TRAP="$TRAP; BASENAME=\"\${DESTFILE##*/}:2,S\"" + TRAP="$TRAP; DIRNAME=\"\${DESTFILE%/new/*}/cur\"" + TRAP="$TRAP; DESTFILE=\"\$DIRNAME/\$BASENAME\"" + TRAP="$TRAP; mv \"\$LASTFOLDER\" \"$BASE/\$DESTFILE\"" +} + :0 { LOG="deliver: delivering message $MSGID to $DEST$NL"