Rejaine Monteiro wrote:
Does anyone know of command or script in to extract an "forwarded
attached" email (eg: Forwarded.eml file attached email) on linux command
line/shell script/perl/pyton etc.. I am trying to reformime, ripmime,
but I'm not succeeding yet....
The idea is to make the user, when receiving spam, redirect mail to a
spam account (ie. spam@mydomain), like attached email, run a scritp to
extract the attached EML file and run sa-learn on it...
Thanks any tips!!
I posted the code I wrote for our spam report handling address here, in
December 2013:
http://mail-archives.apache.org/mod_mbox/spamassassin-users/201312.mbox/ajax/%3C52C2E950.8070804%40vianet.ca%3E
(It took a while to find because the Apache archives don't have a search
function, and the other public list-archive sites all seem to be
variously broken or awkward to search; I ended up looking back in the
folder I file this list in.)
Note this is a blob integrated in our local mail delivery handling
chain, but that should cover the basics.
Fair warning: That was the easy part. The hard part is in getting
users to correctly forward messages as an RFC822 attachment
(message/rfc822), if you don't have a handy webmail system with a
"report as spam" button that Does It Right.
You'll also get users (mis)reporting legitimate mail of all kinds as
spam (deliberately or otherwise); hand-sort the reports *before*
feeding the messages to sa-learn. We have a few users that regularly
report pretty much "all the mail in my Inbox", most of which is ham, and
which would seriously break Bayes if we just passed those reports
through unsorted.
-kgd