PDA

View Full Version : mail.policy


deflin
30th December 2005, 18:58
I'm still having problems to get my new mailserver working...
Now I'm getting errors about mail.policy in my logfiles. Since I can't receive mail (DNS is ok) I can't test my previous error...
Can anybody help me?

Dec 30 18:46:54 localhost amavis[1257]: (01257-02) lookup_sql: 1146, Table 'mail.policy' doesn't exist
Dec 30 18:46:54 localhost amavis[1257]: (01257-02) TROUBLE in check_mail: creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN11> line 8.
Dec 30 18:46:54 localhost amavis[1257]: (01257-02) PRESERVING EVIDENCE in /var/lib/amavis/amavis-20051230T184654-01257
Dec 30 18:46:54 localhost postfix/smtp[1294]: 7BB006E00C: to=<postmaster@oranga.nl>, relay=127.0.0.1[127.0.0.1], delay=56776, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01257-02, creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN11> line 8. (in reply to end of DATA command))
Dec 30 18:46:54 localhost amavis[1258]: (01258-02) lookup_sql: 1146, Table 'mail.policy' doesn't exist
Dec 30 18:46:54 localhost amavis[1258]: (01258-02) TROUBLE in check_mail: creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN11> line 8.
Dec 30 18:46:54 localhost amavis[1258]: (01258-02) PRESERVING EVIDENCE in /var/lib/amavis/amavis-20051230T184654-01258
Dec 30 18:46:54 localhost postfix/smtp[1275]: 348E16E012: to=<deflin@oranga.local>, relay=127.0.0.1[127.0.0.1], delay=1636, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01258-02, creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN11> line 8. (in reply to end of DATA command))

deflin
30th December 2005, 19:16
never mind. I think there was some kind of typo in my amavisd.conf. I copied the one in the howto (Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV), restarted amavis and now it works :-)

falko
20th March 2007, 16:43
I've just got this email with the solution: :)

Hi,

After reading for more than 2 days, I found what's missing from the standard
amavisd.conf, that's why amavisd writes to the logs:
"Table 'mail.policy' not found."

There are some forum's about this, nobody knows what's the problem.
I don't want to register to the forum, just let you know the problem.
Bye
I love your tutorials.
(http://www.howtoforge.com/forums/archive/index.php/t-1877.html)


@lookup_sql_dsn =
( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306' , 'mail_admin',
'mail_admin_password'] );



This is the missing line:

$sql_select_policy = 'SELECT "Y" as local FROM domains WHERE
CONCAT("@",domain) IN (%k)';