Re: local_domains_maps in amavisd-new

You are right, Amavisd invokes SpamAssassin and the hit 8.292 was done... But without the domain in local_domain_maps, the subject of the message is not tagged and the message is not moved to Junk folder, it's simply delivered as normal message. Is this right???

Just put the domain in local_domain_maps and the message is tagged (subject *** SPAM ***) and it is moved to Junk folder. So the iRedMailPro need to put every new domain in local_domain_maps.

Re: local_domains_maps in amavisd-new

Re: local_domains_maps in amavisd-new

Using . at @local_domains_maps does not work if you filter all spam sent from local domains. This is because Amavisd will not be able to distinguish local and remote domains from each other, and will consider everything to be local.

Edit: The following seems to help:

#@local_domains_maps = ( [".$mydomain","mail.mydomain.de"] ); # list of all local domains$sql_select_policy = 'SELECT "Y" AS local FROM domain WHERE CONCAT("@", domain) IN (%k)';

I wonder if this is why iRedAdminPro shows remote users in the dashboard top senders list. I'm more interested in knowing who the actual top users are that are generating outbound mail than to see how much inbound traffic we get from Facebook or Twitter.

At any rate, a more elegant solution for local_domains_maps is needed.

Re: local_domains_maps in amavisd-new

I was able to accomplish what I need by setting

@local_domains_maps = ();

Since I don't have any domains that I process outbound mail for without corresponding users in LDAP, I don't need to explicitly list any domains. Since I don't have any users listed in LDAP that aren't considered local users (at least in that branch of my LDAP directory) I don't have to worry about exceptions and setting amavisLocal on users.

I had just assumed that all domains had to be listed for this to work. I was wrong and suspect others have made the same assumption.

LDAP implicitly prepends the lookup for a user to local_domains_maps. Hence my list is empty and I just deal with each user case by case as they send mail. LDAP does this lookup anyway so there is no additional overhead associated with this approach.

This handles a constantly changing list of 50+ domains without having to mess with stable config files. I'm also able to use the MYUSERS policy bank as intended - just on locally generated outbound mail.

So far as the logs go, I like them to reflect reality. I often exchange log information with other sysadmins when having to troubleshoot mail pathing issues. If my logs are wonky the finger is automatically pointed my direction and I waste time having to explain anomalies.

I'm still checking total server behavior, but it seems this fix does what I need. I do want to scan outbound mail for spam so need to confirm that is enabled and working. Locally originating messages are now flagged correctly outbound.

Passed CLEAN {RelayedOutbound}, MYUSERS

Spam filtering on relayed mail no longer shows as MYUSERS. Currently appearing in logs as

Re: local_domains_maps in amavisd-new

Just confirming that everything seems to be working as intended with regard to outbound spam detection. Sending an outbound message with the GTUBE string embedded generated an admin email which included the following scores. It scored inbound mail on port 587 with -10 since it originated from a trusted source, then slammed it +1000 for GTUBE.

I'm quite happy with the end result. Perhaps this was too obvious for others to post. I've been struggling with it and was too stubborn to give in and just statically list the local domains and their aliases.