LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Add spam header into email messages! (https://www.linuxquestions.org/questions/linux-server-73/add-spam-header-into-email-messages-776859/)

celeron 12-19-2009 08:36 AM

Add spam header into email messages!
 
Dear experts,
I'm setting up email gateway using Postfix, Amavisd-new, ClamAV and SpamAssassin on Opensuse 11.1. Everything seems okie, but I can't have messages with added spam headers, such as:
X-Spam-Flag: NO
X-Spam-Score: 0.233
X-Spam-Level:
X-Spam-Status: No, score=0.233 tagged_above=-10 required=6.6
tests=[ALL_TRUSTED=-1.8, AWL=0.536, BAYES_50=0.001,]

When I try to debug amavis, I can see that SPAM-TAG, <abc@yahoo.com> -> <celeron@domain.com>, No, score=5.406 tagged_above=-999 required=6.2 tests=[LOCAL_DRUG=4, NO_DNS_FOR_FROM=1.407, NO_RELAYS=-0.001] but they don't add to email messages.

I've configured amavisd-new with $sa_tag_level_deflt = -999 to add spam headers at all but not successful.

Please help me to find out the cause of the problem.

Many thanks for your regards,

kbp 12-20-2009 10:09 PM

Try changing it from '-999' to 'undef' and see if that makes a difference

cheers

celeron 12-21-2009 02:21 AM

Dear kbp,
Thanks for your reply. I've tried to change it to 'undef' but not also successful! I can't have spam header to email messages. Am I missing anything?

Best Regards,

forubu 12-21-2009 02:26 AM

It's SpamAssassin that would add the headers. Have you configured it correctly?
Check out local.cf in /etc/spamassassin/ for how to add spam headers.

celeron 12-21-2009 06:03 AM

Dear forubu,
I've added the following header to local.cf, but it doesn't still work.
clear_headers
add_header spam Flag _YESNOCAPS_
add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
add_header all Level _STARS(*)_
add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_

Please help me to resolve the problem!

Many thanks,

kbp 12-21-2009 07:12 PM

Hi Celeron,

Are you forwarding the mail to another server or account? ... I think the 'X-Spam... ' tags will get stripped out if the email is forwarded. Try adding a local account on the mail filtering server and sending a test email from an external account

my test email output to a local account:
Code:

...
X-Virus-Scanned: amavisd-new at xxxx.yyy
X-Spam-Score: 0.483
X-Spam-Level:
X-Spam-Status: No, score=0.483 tagged_above=-100 required=6.31
        tests=[AWL=0.483]
...

my test email output to a forwarded account:
Code:

...
X-virus-scanned: amavisd-new at xxxx.yyy
...

cheers

celeron 12-21-2009 09:56 PM

Many thanks kbp! That is my exactly problem.

Have a great day!


All times are GMT -5. The time now is 05:44 AM.