# Problem mit Amavis + SQL



## schleckerbeck (2. Juli 2007)

allo,

wollte Postfix mit Amavis ClamAV und Spamassassin konfigurieren. Leider bekomme ich folgende Fehlermeldung in der /var/log/mail:

```
Jul  2 15:13:21 linux amavis[24529]: (24529-06) lookup_sql: -1, called with 5 bind variables when 0 are needed
Jul  2 15:13:21 linux amavis[24529]: (24529-06) TROUBLE in check_mail: cached FAILED: DBD::mysql::st execute failed: called with 5 bind variables when 0 are needed at (eval 51) line 244, <GEN15> line 16.
Jul  2 15:13:21 linux amavis[24529]: (24529-06) PRESERVING EVIDENCE in /var/spool/amavis/tmp/amavis-20070702T151321-24529
```

In meiner amavisd.config steht folgendes:

```
@lookup_sql_dsn =
 ( ['DBI:mysql:database=vhcs2;host=localhost;port=3306', 'root', 'password'] );
#     ['DBI:mysql:database=vhcs2;host=localhost', 'root', 'password'] );

$sql_select_policy = "Select 'Y' as local from domain where CONCAT('@',domain_name) IN (%k)";
```

Was hab ich bei der sql_select_policy falsch gemacht? In welcher Form braucht Amavis die Daten?

MfG


----------

