At 06:08 PM 2/14/2009, post...@corwyn.net wrote:
Is there a way to get amavisd to read/know my local_domain_maps from
postfix (which is hosting multiple wildly different virtual domains)
somewhere so that this updates dynamically? I searched around for a
while, and that seemed like a complex undertaking. If my domains
were hashed it'd be one thing, but they're all in mysql.
Answering my own question I think. With some tinkering and searching,
I think modifying amvisd.conf to:
#...@local_domains_maps = ( [".$mydomain"] ); # list of all local domains
#...@local_domains_maps = ( ); # list of all local domains
@lookup_sql_dsn = (
['DBI:mysql:database=postfix;host=127.0.0.1;port=3306',
'postfix', 'password'] );
$sql_select_policy =
"SELECT domain AS domain_name FROM domain WHERE domain='%s'";
@lookup_sql_dsn = (
['DBI:mysql:database=postfix;host=127.0.0.1;port=3306',
'postfix', 'password'] );
$sql_select_policy =
'SELECT "Y" as local FROM domain WHERE CONCAT("@",domain) IN (%k)';
lets amavisd search for the domain in the local mysql database used
by postfix for virtual domains. Woot!
Rick