Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've read all the SA stuff I can find, but for some reason I can't seem to find an answer to my question.
I'm wondering what SA's behaviour is supposed to be when it detects spam. For example, in this log entry:
Quote:
Jun 13 17:44:28 jonzdev spamd[1287]: connection from localhost [127.0.0.1] at port 47361
Jun 13 17:44:28 jonzdev spamd[1287]: checking message <KVITCSAECWQZFNQGFMUTB@charter.net> for (unknown):33.
Jun 13 17:44:29 jonzdev citadel: -1: from=<acc-overview@paypal.com>, nrcpts=1, relay=206-251-72-194.host.webnx.com [206.251.72.194], stat=550 5.7.1 Message rejected by SpamAssassin^M
Jun 13 17:44:29 jonzdev spamd[1287]: identified spam (8.9/5.3) for (unknown):33 in 0.8 seconds, 11173 bytes.
Jun 13 17:44:29 jonzdev spamd[1287]: result: Y 8 - FORGED_MUA_AOL_FROM,FORGED_RCVD_HELO,HTML_FONT_BIG,HTML_MESSAGE,HTML_TITLE_UNTITLED,MISSING_MIMEOLE, MPART_ALT_DIFF,MSGID_FROM_MTA_HEADER,MSGID_SPAM_CAPS,RCVD_NUMERIC_HELO,WEIRD_PORT,X_MSMAIL_PRIORITY_ HIGH,X_PRIORITY_HIGH scantime=0.8,size=11173,mid=<KVITCSAECWQZFNQGFMUTB@charter.net>,autolearn=no
I would prefer that SA didn't "reject" the email. I want all of them at this point so I can filter them our on the client end.
Filtering on the client-side, however, requires X-Spam headers which is my second problem. I cannot seem to get SA to write the X-Spam headers. Ideally, I just want the X-Spam-Score and X-Spam-Flag headers written so I can filter on them. However, at the moment SA is rejecting everything that it figures is spam (as seen in the log snippet above) and isn't writing any X-Spam headers on the stuff it's letting through.
In short, I'd like to do two things:
1. Make SA stop rejecting messages that are over the required_score, and
2. Write X-Spam-Score and X-Spam-Flags headers on every message.
Here's my local.cf. My user_prefs is completely commented out.
Quote:
# How many hits before a message is considered spam.
required_score 5.0
# Change the subject of suspected spam
rewrite_header Subject [SPAM]
# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 1
# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages all
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales all
#Write the spam headers
add_header all Score _SCORE_
add_header all Flags _YESNO_
Any help would be much appreciated. I know that what I want is rather rudimentary and I should be able to dig it out myself, but I just can't seem to understand the behaviour...
You will have to do some research via www.google.com/linux in re spamassassin and procmail. Spamassassin can flag mail as SPAM. The spamaassassin rules can determine what to do with mail (whitelisted, blacklisted, etc) in so far as flagging the mail for acceptance or rejection.
Then procmail enters the picture. Procmail may be setup to work with spamassassin to accept/reject mail, or sort it, and send spam to a folder for later review.
Add the complexity of email antivirus scanning to work with procmail and spamassassin.
Google on the search words 'spamassassin rules' and 'procmail'. There is a wealth of information.
You will have to do some research via www.google.com/linux in re spamassassin and procmail. Spamassassin can flag mail as SPAM. The spamaassassin rules can determine what to do with mail (whitelisted, blacklisted, etc) in so far as flagging the mail for acceptance or rejection.
Then procmail enters the picture. Procmail may be setup to work with spamassassin to accept/reject mail, or sort it, and send spam to a folder for later review.
Add the complexity of email antivirus scanning to work with procmail and spamassassin.
Google on the search words 'spamassassin rules' and 'procmail'. There is a wealth of information.
Ahh...the missing link. OK, thanks for the info. Off I go.
OK, well, that was a total bust. I'm as clueless as I was when I started this research.
My biggest problem right now is that SA is NOT rewriting my subject line when it encounters spam. I have the rewrite_subject lines in tmy local.cf and I kow SA is readingmy local.cf, even the mail.log shows Sa identifiying messages as Spam - it just doesn't write anything to it - no x-spam headers, no subject rewrite, nothing....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.