SA Bugzilla – Bug 6556
Only mass-check emails that have been read
Last modified: 2011-11-03 19:47:48 UTC
Maildirs contain the subdirectories "cur" (read emails), "new" (unread emails), and "tmp". I'd like a flag for mass-check to only use the "cur" directory. I think it would be appropriate to recommend using it to everyone except for spam traps (with no email addresses that were ever valid)? Currently I'm doing this by copying only the "cur" directory from my maildirs to a new directory used only for mass-check.
Specs for Maildir: http://cr.yp.to/proto/maildir.html Has been read if filename matches /:.*2,\D*S/ Basically, ends with "S". Example: 1302116417.16310_2.panic:2,S Specs for mbox: http://wiki1.dovecot.org/MailboxFormat/mbox Has been read if Status header matches /R/.
(In reply to comment #1) > Specs for Maildir: > http://cr.yp.to/proto/maildir.html > > Has been read if filename matches /:.*2,\D*S/ > Basically, ends with "S". Example: 1302116417.16310_2.panic:2,S > > > Specs for mbox: > http://wiki1.dovecot.org/MailboxFormat/mbox > > Has been read if Status header matches /R/. there is no 100% standard for Maildir file naming. the S & R may be used by a few, but not all. IMO, you can easily only replicate read or not read to your MC folder using lots of availabel tools. It's hardly in SA's scope to do this.
AXB, is there a reason a patch wouldn't be accepted? Wouldn't it significantly reduce the effort to maintain folders for use with mass-check (for anybody using mail software that uses these flags)? And sure, I could just do "find ~/Maildir/cur -name "*S" | xargs -I foo cp foo ~/ham-for-masscheck ; mass-check ham:dir:~/ham-for-masscheck" But isn't it silly not to just implement it in mass-check?
(In reply to comment #3) > AXB, is there a reason a patch wouldn't be accepted? Wouldn't it significantly > reduce the effort to maintain folders for use with mass-check (for anybody > using mail software that uses these flags)? > And sure, I could just do "find ~/Maildir/cur -name "*S" | xargs -I foo cp foo > ~/ham-for-masscheck ; mass-check ham:dir:~/ham-for-masscheck" > > But isn't it silly not to just implement it in mass-check? nobody intends to stop you from submitting a patch.
FWIW, it would simplify my setup if the masscheck script supported skipping unread email in mailboxes. Currently, I have to filter my inbox into a separate ham folder to avoid processing messages that I haven't yet looked at and could contain spam. This is what I'm currently doing as a work-around: nice ionice -c2 -n6 rsync -al '--include=*:2,*S*' '--exclude=*' --delete-after \ --link-dest=/mail/bernie/cur/ /mail/bernie/cur/ /mail/bernie/masscheck/confirmed_ham/cur/ nice ionice -c2 -n6 rsync -al '--include=*:2,*S*' '--exclude=*' --delete-after \ --link-dest=/mail/bernie/.@FSF/cur/ /mail/bernie/.@FSF/cur/ /mail/bernie/masscheck/confirmed_ham_fsf/cur/
I can argue the necessity of this patch both ways. However, in the end, masscheck is intended to be run on hand-classified mail. Running it on an Inbox seems a bit odd to me and the tools to copy it for the purposes of masscheck exist (and are documented in this ticket). Closing as wontfix but I wouldn't turn down applying a patch for the option to do this. But it should be a non-default option for backwards compatibility.