Jameson Graef Rollins jrollins at finestructure.net
Mon Mar 6 15:29:21 PST 2017

Hi, folks.  In my on-going war with spam [0], the new battle ground is
false positives: I'm losing too much ham to mis-classification.

For my first line of attack, I would like automatically whitelist every
address to which I have ever sent mail.  I realize this is flawed
(spammers frequently pose as me) but it's my best hope at the moment for
recovering false positives (which is more important than a couple of
additional false negatives).

It's fairly easy to find all such addresses, e.g.:

notmuch address --output=recipients from:jrollins...

But I'm having a hard time coming up with an efficient way to tag mail
coming from any of these address (which total ~4k).  The only command
line way to do it that I've come up with is:

<whitelist.txt xargs -l -I{} notmuch tag -spam tag:spam AND from:{}

This works ok, but takes more than 20s to execute, which will slow down
my inbox processing quite a bit.  I could try to write a python script
to iterate over all tag:spam, extract addresses from those messages, and
match against the whitelist, but I doubt that will be any faster.

Does anyone out there have any better suggestions on how to handle this
kind of white listing?  Anyone come up with any more efficient
algorithms?  Thanks in advance for any suggestions.


[0] id:87sj49gha7.fsf at servo.finestructure.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20170306/6f7894dc/attachment.sig>

More information about the notmuch mailing list