LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   amavisd-new / spamassassin whitelist issue (https://www.linuxquestions.org/questions/linux-server-73/amavisd-new-spamassassin-whitelist-issue-762172/)

scheidel21 10-15-2009 02:15 PM

amavisd-new / spamassassin whitelist issue
 
I have a few emails that keep getting tagged by amavisd and spamassassin as spam that are legit emails. I have added the users and their domains where applicable to both the spamassassin whitelist and to softwhitelisting in amavis, neither seems to have an effect the same users keep getting tagged as spam. does anyone have any ideas why this would be happening. I restart amavisd and spamasasin after making changes.

bathory 10-15-2009 05:22 PM

How did you add the recipients you want to whitelist? For spamassassin you have to use in local.cf:
Code:

whitelist_from user@domain.com other-user@other-domain.com
To see if it takes effect use:
Code:

spamassassin -t < mail.txt
Here is what I get when I use the gtube test file using a "from:" address that is whitelisted:
Quote:

pts rule name description

-100 USER_IN_WHITELIST From: address is in the user's white-list
-0.0 NO_RELAYS Informational: message was not relayed via SMTP
1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email
For amavisd, you have to add the whitelisted recipients in a file defined in the whitelist_sender directive.

scheidel21 10-16-2009 11:55 AM

In the spamassassin file I have *@domain.com for whole domain whitelisting, unless I have the syntax wrong, as far as my soft whitelisting in amavis it is exactly the same syntax as the examples.

bathory 10-18-2009 03:15 AM

Did you run a test to see if the whitelisted recipients get a -100 score?
You can run:
Code:

spamassassin -D --lint
to check for syntax errors.
Btw you don't need to use both programs whitelisting options. For me just adding the recipients in spamassassin's local.cf works.

scheidel21 10-19-2009 07:51 AM

How do I test the email again, export it as as eml then I forget what code to run to test it. Is it the spamassassin -D --lint email.eml?

bathory 10-19-2009 08:15 AM

No you should export it as txt, or use the sample-spam.txt that comes with spamassassin. If you don't have it create a test.txt with the following content:
Code:

From: Sender <sender@example.net>
To: Recipient <recipient@example.net>
Subject: Test spam mail (GTUBE)

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

and run:
Code:

spamassassin -t < test.txt
Regarding the lint option, that is used to check rules, you should run just
Code:

spamassassin -D --lint


All times are GMT -5. The time now is 07:09 PM.