I use a maildrop script to sort my mails directly on the mail server into folders and I would like it to mark certain unnecessary mails as read.
Unfortunately maildrop does not seem to have a command for that.
Right now I use this line to rename the newest mail of the qmail Maildir folder to a 2,s read status:
`ls -t "$MAILDIR/.0 Spamfilter.catchall/new" | head -1 | xargs -I {} mv "$MAILDIR/.0 Spamfilter.catchall/new/{}" "$MAILDIR/.0 Spamfilter.catchall/cur/{}:2,S"`
However, this sometimes fails and the mail remains unread. I guess there is a race condition, when another mails arrives, before the mv has been executed.