Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Amavis with SpamAssassin (virtual domains & virtual users)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2446
Location: /home/zach

PostPosted: Thu Aug 28, 2014 8:19 pm    Post subject: Amavis with SpamAssassin (virtual domains & virtual user Reply with quote

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
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2446
Location: /home/zach

PostPosted: Thu Aug 28, 2014 8:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2446
Location: /home/zach

PostPosted: Fri Aug 29, 2014 3:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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