Topic: Problem with lookup_sql_dsn in amavisd-new
==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: CentOS 6.3
- Related log if you're reporting an issue: 
==== 
I've tried to uncomment the following lines at /etc/amavisd/amavisd.conf:
# Uncomment below two lines to lookup virtual mail domains from MySQL database.
@lookup_sql_dsn =  (
    ['DBI:mysql:database=vmail;host=127.0.0.1;port=3306', 'vmail', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX']
);
# For Amavisd-new-2.7.0 and later versions. Placeholder '%d' is available in Amavisd-2.7.0+.
#$sql_select_policy = "SELECT domain FROM domain WHERE domain='%d'";
# For Amavisd-new-2.6.x.
# WARNING: IN() may cause MySQL lookup performance issue.
$sql_select_policy = "SELECT domain FROM domain WHERE CONCAT('@', domain) IN (%k)";
The default installation of amavisd-new is amavisd-new-2.6.6-3.el6.noarch, so the last sql_select_policy was used.
Restarted amavisd and:
Aug 16 18:23:46 pardal amavis[3799]: (03799-01) (!)lookup_sql: sql exec: err=16, S1000, DBD::mysql::st bind_param failed: Illegal parameter number at (eval 99) line 164, <GEN21> line 4., 16, Illegal parameter number
Aug 16 18:23:46 pardal amavis[3799]: (03799-01) (!!)TROUBLE in process_request: sql exec: err=16, S1000, DBD::mysql::st bind_param failed: Illegal parameter number at (eval 99) line 164, <GEN21> line 4. at (eval 102) line 281, <GEN21> line 4.
Aug 16 18:23:46 pardal amavis[3799]: (03799-01) (!)Requesting process rundown after fatal error
None message are processed.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.





 I'm guessing DKIM was defined using MyUSERS somehow which doesn't get called anymore. I'll keep playing
 I'm guessing DKIM was defined using MyUSERS somehow which doesn't get called anymore. I'll keep playing