On 02Nov2012 20:15, Russell L. Harris <rlhar...@oplink.net> wrote: | * Jamie Paul Griffin <ja...@kode5.net> [121102 19:36]: | > I have set up macros that bind keys to pass messages to spamassassin | > using sa-learn and then puts the message into the spam mailbox. Is | > this the type thing you mean? The spam mailbox can later be used to | > train spamassassin for future filtering, using procmail. | | Is the "return path" the true address of the sender?
No. In legitimate messages it is where errors should go. For a person, that would normally be themselves. But for a mailing list it would be the list admin. | If so, I would | like to blacklist such addresses. Not a lot of point. | The "From:" field shown in the | message index of Mutt almost always is rewritten -- sometimes to an | address from which valid messages may originate -- so I hesitate to | blacklist such addresses. Indeed. I've just implemented a script for this (adding a message subject as a spam filter rule), and I have this macro: macro index,pager SS "<save-message>+spool-spam-subj<enter><next-undeleted>" "delete message as spam by subject" I have arranged that messages saved to "+spool-spam-subj" get their subjects saved to my "spam-subj" mail filing rules file. Details below. I am not using spamassassin myself, but have a fairly effective strategy: - I catch "important" messages as being to "me" and "from" a whitelist of known addresses (actually a whitelist of address groups - the SO, family, friends and an assortment of business entities like my credit union) - I catch and alert on a short list of very specific messages from monitoring systems, based on to: and from: _and_ subject: - an ad hoc list of other special rules - I have a zillion rules for various mailing lists, generally based on to/cc: or sender: - anything else lands in my "UNKNOWN" folder; it is 99% spam I always sort that folder on subject when I visit it; it makes tossing it much easier because a lot of spam gets repeated in big chunks This keeps my inbox fairly clean without nebulous bayesian filters etc. The SO also keeps a blacklist of subject lines; I've been meaning to do the same and your post has kicked me to do so. How it works: My mail setup is as follows: - I fetch with getmail, delivering to my "spool" maildir - I filter messaging using my mailfiler program, which monitors a list of maildirs once a second, thus: mailfiler monitor -d 1 ~/mail/spool ~/mail/spool-in ~/mail/spool-out ~/mail/spool-spam-subj The "spool" rules are meant to divert the spam and deposit probably nonspam into the "spool-in" maildir, which runs all the rules for the mailing lists etc. The rules for "spool" sources my "spam-subj" rule file, currently saying this: # spam matching by subject line =spam SPAM-SUBJ subject:/^Anz e-banking alert which files messages to the "spam" folder with the X-Label "SPAM-SUBJ" if they match my (sole, so far) common spam subject. The reason it is a separate file is that the script to add a new subject line rewrites that file. The script itself is here: https://bitbucket.org/cameron_simpson/css/src/tip/bin-cs/email-add-spam-subject The filter rules for the "spool-spam-subj" maildir (monitored above by the mailfiler) read: < env # add this message's subject to the spam subject list "|email-add-spam-subject" . . spam . . It pipes the message to the email-add-spam-subject script (which rewrites the spam-suj rules file) and saves the message in my "spam" folder where it all accumulates, like a septic tank. email-add-spam-subject emits a new rule and sorts it into the existing rules, rewriting the file if it changes. Cheers, -- Cameron Simpson <c...@zip.com.au> Is it true, Sen. Bedfellow, that your wife rides with bikers? - Milo Bloom