X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/ba62adb2c3d0d730f84572326c1cd6023231b705..e240fb6eb8ba566a5791c64ec924a0416829aaed:/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"