Make Spamassassin learn spam mails

Eoin Kim Eoin.Kim at rcst.com.au
Tue May 2 04:16:49 UTC 2017


Thanks Mark,

I can spin my head a bit now. I'll have a go. Thanks again.

Eoin

-----Original Message-----
From: MailScanner [mailto:mailscanner-bounces+eoin.kim=rcst.com.au at lists.mailscanner.info] On Behalf Of Mark Sapiro
Sent: Tuesday, 2 May 2017 2:12 PM
To: mailscanner at lists.mailscanner.info
Subject: Re: Make Spamassassin learn spam mails

On 05/01/2017 08:14 PM, Eoin Kim wrote:
> 
> Thanks for your reply. So, I guess the mutt is being used as an MUA for postfix user and the inbox of postfix user would be '/var/spool/postfix/incoming' something like that? So, this concept is not intercepting the incoming emails, is it? The mails will continue flowing as usual? I have to read manuals further but if you don't mind, I'd like to know the principle of this method. Thanks a lot.


Actually, in my case, mutt is the MUA used by a user whose name is not root, but whose UID is 0. (Note that this is not recommended) and mutt's inbox for that user is /var/spool/mail/username.

Note that this is probably an uncommon situation as it is probably much more common for users to access their "inbox" via imap or pop3 from some remote MUA. Thus, the forwarding address makes more sense. Also note that a straight inline forward is not the best idea as it alters the message.

I simplified things when I said

I also have an alias in my postfix that is effectively

Spam_Report: "|spamc -u postfix -L spam  || true"

It is actually

Spam_Report: "|filter|spamc -u postfix -L spam  || true"

where 'filter' is a program that reads an email message with an attached message from stdin and writes just the attached message to stdout after removing a few MailScanner headers. Thus, to learn a message as spam, one forwards it as an attachment to the Spam_Report address.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner



More information about the MailScanner mailing list