_AA_ wrote:
> Originally posted here: http://forums.gentoo.org/viewtopic-t-512336.html
> Hope someone can help me with this.
> Setup
> AMD64, postfix, mysql, courierauth, amavis, spamassassin and clamav
> doing virtual mailboxes.
> Now the mail system works perfectly until I add amavis.
> This is what happens once amavis is thrown into the equation:
> elvira ~ # telnet 127.0.0.1 10024
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> 220 [127.0.0.1] ESMTP amavisd-new service ready
> ehlo localhost
> 250-[127.0.0.1]
> 250-VRFY
> 250-PIPELINING
> 250-SIZE
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250-DSN
> 250 XFORWARD NAME ADDR PROTO HELO
> MAIL FROM: <[EMAIL PROTECTED]>
> 250 2.1.0 Sender [EMAIL PROTECTED] OK
> RCPT TO: <[EMAIL PROTECTED]>
> 421 4.3.2 Service shutting down, closing channel
> Connection closed by foreign host.
> elvira ~ #
> SMTP error code 421: The service is not available and the connection
> will be closed.
> In /var/log/messages :
> elvira amavis[5281]: (05281-01) (!) lookup_sql: sql exec: err=1146,
> S1000, DBD::mysql::st execute failed: Table 'vmail_db.policy' doesn't
> exist at (eval 38) line 138, line 3., 1146, Table 'vmail_db.policy'
> doesn't exist
> Oct 31 22:05:17 elvira amavis[5281]: (05281-01) (!!) TROUBLE in
> process_request: sql exec: err=1146, S1000, DBD::mysql::st execute
> failed: Table 'vmail_db.policy' doesn't exist at (eval 38) line 138,
> line 3. at (eval 41) line 262, line 3.
> Oct 31 22:05:17 elvira amavis[5281]: (05281-01) (!) Requesting
> process rundown after fatal error
> Oct 31 22:05:17 elvira amavis[5336]: TIMING [total 5 ms] - bdb-open:
> 5 (100%)100, rundown: 0 (0%)100
>>From /etc/amavisd.conf
> @lookup_sql_dsn =
> ( ['DBI:mysql:database=vmail_db;host=127.0.0.1;port=3306',
> 'vmail_user', 'vmail_password'] );
> Why is it looking for a policy table when I have not set up per
> recipient policies?
> Any help would be muchly appreciated. Ta.
> P.S. I followed this guide (amongst others):
> http://gentoo-wiki.com/HOWTO_Spam_Filtering_with_Gentoo,_Postfix,_Amavis
Amavisd-new by default has its own database structure as shown in:
http://www.ijs.si/software/amavisd/README.sql.txt
http://www.ijs.si/software/amavisd/release-notes.txt
added some support for non amavisd-new tables - search for:
- added global configuration variables $sql_lookups_no_at_means_domain
If using a table not designed for amavisd-new, you also need to change
$sql_select_policy. There are a couple examples in amavisd.conf-sample
included with 2.4.3.
The default is:
# $sql_select_policy = 'SELECT *,users.id FROM users,policy'.
# ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
# ' ORDER BY users.priority DESC';
and a sample:
# Here is an example of a SELECT clause that fabricates an artificial 'users'
# table from actual table 'postfix_domains' containing a field 'domain_name'.
# The effect is that domains listed in the 'postfix_domains' table will be
# treated as local by amavisd, and be given settings from a policy id 99
# if such a policy id exists, or just fall back to static lookups.
# The user.id (with a value 1) is there only to provide a user id (same id
# for all listed domains) when global SQL-based white/blacklisting is used.
#
# $sql_lookups_no_at_means_domain = 1;
# $sql_select_policy =
# 'SELECT *, user.id'.
# ' FROM (SELECT 1 as id, 99 as policy_id, "Y" AS local'.
# ' FROM postfix_domains WHERE domain_name IN (%k)) AS user'.
# ' LEFT JOIN policy ON policy_id=policy.id';
Gary V
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/