X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/45ff291908a431109c67c04807993f654089e24d..1a6c7a830ef0d5a4537dcc25ffcc62b275f02d25:/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"