[CentOS] amavis-new and mysql

Robert Moskowitz

rgm at htt-consult.com
Thu Nov 20 14:24:10 UTC 2014


Trying to figure this out, as it worked on my old server, but lots is 
different on my new server....

I forgot the mysql connection for amavis-new in my new mailserver, as 
none of the tutorials I was pouring through mentioned this, even though 
they claim they supported virtual domains...

Maybe amavis-new has gotten smart enough to recognize a domain as not 
the one describe and suspect relaying.  Anyway...

in /etc/amavis/amavis.conf I added:

@lookup_sql_dsn =
    ( ['DBI:mysql:database=postfix;host=127.0.0.1;port=3306', 'postfix', 
'password'] );

but am getting in maillog:

Nov 20 09:15:10 z9m9z postfix/error[3237]: AC81A62159: 
to=<user at virtualdomain.com>, relay=none, delay=1, delays=0.99/0/0/0.05, 
dsn=4.4.2, status=deferred (delivery temporarily suspended: lost 
connection with 127.0.0.1[127.0.0.1] while sending DATA command)

Is there something off with that connection?  Something is listening on 
port 3306:

# netstat -an|grep 3306
tcp        0      0 0.0.0.0:3306 0.0.0.0:*                   LISTEN

Perhaps because I forgot:

$sql_select_policy = 'SELECT domain from domain WHERE CONCAT("@",domain) 
IN (%k)';

Which I picked up from an ubuntu help site google 'found' for me. The 
Centos amavis-new howto does not cover supporting a mysql table of 
virtual domains.





More information about the CentOS mailing list