0

I am splitting up my postfix mail server into separate instances - outgoing and incoming. Both mail servers handle mail for multiple domains using a sql database and the virtual_mailbox_domain lookup.

The incoming mail server is setup with amavisd-new as a content-filter. The instance of amavisd-new should assume all mail is not outgoing and do all the appropriate checks. Currently I am having to do the sql lookup again in amavisd-new to get the desired behavior.

Is there a way to configure amavisd-new to assume all mail is not outgoing?

#amavisd.conf
use strict;
$max_servers = 24;
$mydomain = 'catzo.com';
$enable_dkim_verification = 1;
@local_domains_maps = ( [".$mydomain"] );
@mynetworks = qw( 127.0.0.1 );
@inet_acl = qw( 127.0.0.1 );
$inet_socket_port = 10026
#
#normal spam tag stuff
# 
# redundant lookup   
@lookup_sql_dsn = ( ['DBI:mysql:database=;host=;port=3306','user','password'] );       
$sql_select_policy = 'SELECT domain_name FROM view_email_domains WHERE CONCAT("@",domain_name) IN (%k)';
# No Policy Banks
# standard clamav options.
  • 1
    Hey Aaron, could you please describe your problem and not your solution. How does your desired behaviour look like? What is your setup currently doing and what action do you want to change. – sebokopter Nov 7 '14 at 0:18
  • 1
    My problem is I can not configure amavisd to assume all mail is incoming. Amavisd should not need to lookup the domain to determine if the recipient is local. All mail going to the instance is local. It is a waste to have postfix lookup the user and then have amavisd lookup the user. It make sense in the case where amavisd is scanning both incoming and outgoing mail, but in this case the mail is always incoming to a valid user. – Aaron Renoir Nov 7 '14 at 1:56
4

If you are sure, that all mails to amavis are going to your users and you don't want to lookup your database, then disable your SQL parameters and set

@local_domains_maps = ( ["."] );

With that setting every mail amavis receives is considered to have a local user as destination.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.