X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/ba62adb2c3d0d730f84572326c1cd6023231b705..fb9b05d69b0ed315889168a1499b9c5a879548e5:/procmail/deliver diff --git a/procmail/deliver b/procmail/deliver index e299423..af2f70c 100644 --- a/procmail/deliver +++ b/procmail/deliver @@ -23,6 +23,16 @@ *$ ! 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"