View previous topic :: View next topic |
Author |
Message |
NathanZachary Moderator


Joined: 30 Jan 2007 Posts: 2506 Location: /home/zach
|
Posted: Thu Aug 28, 2014 8:19 pm Post subject: Amavis with SpamAssassin (virtual domains & virtual user |
|
|
Hello all,
I have spent some time configuring Amavis to work with ClamAV and SpamAssassin on my mail server with many virtual domains and virtual users. It seems like ClamAV is working without problem (as I see the X-Virus-Scanned: header), but I don't think that SpamAssassin is actually doing anything at all. There aren't any X-SPAM* headers at all. Though it was a bit out of date, I followed the instructions on this Wiki page:
http://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/amvisd_spamassassin_clamav
Where should I start in debugging why SpamAssassin doesn't appear to be scanning any incoming emails?
Thank you in advance.
Cheers,
Nathan Zachary _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Last edited by NathanZachary on Thu Aug 28, 2014 9:00 pm; edited 1 time in total |
|
Back to top |
|
 |
NathanZachary Moderator


Joined: 30 Jan 2007 Posts: 2506 Location: /home/zach
|
Posted: Thu Aug 28, 2014 8:58 pm Post subject: |
|
|
Okay, I have found the problem as to why there were no X-SPAM* headers, and it was that I didn't have the virtual domains specified correctly. Basically, I moved them into a file at /etc/postfix/virtual_mailbox_domains, and then referenced that in /etc/postfix/main.cf.
The /etc/postfix/virtual_mailbox_domains file looks like:
Code: |
domain1.tld
domain2.tld
...
domainN.tld
|
and then inside /etc/postfix/main.cf, it is referenced with:
Code: |
virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains
|
I then referenced this same file in /etc/amavisd.conf
Code: |
@local_domains_maps = ( read_hash("/etc/postfix/virtual_mailbox_domains"), [".$mydomain"] ); # list of all local domains
|
Now I get the X-SPAM* headers on all virtual domains. I'm going to keep playing with the spam scores, and what to do with the mail if it is detected as spam. Are there any suggestions on improving spam filtering, silently discarding it (with header_checks or something similar), or redirecting it all to a single mailbox regardless of the virtual domain?
Thanks again!
Cheers,
Nathan Zachary _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
 |
NathanZachary Moderator


Joined: 30 Jan 2007 Posts: 2506 Location: /home/zach
|
Posted: Fri Aug 29, 2014 3:01 am Post subject: |
|
|
Also found out that in the Wiki page, it indicates this line should be in the Amavis relay in master.cf:
Code: |
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
|
However, if you want to redirect spam emails to a different folder (or discard, et cetera), you need to remove the 'no_header_body_checks' portion. That way, you can do something like:
Code: |
/^Subject:.*---SPAM---.*/ REDIRECT spam@domain.tld
|
_________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|