On Sat, March 27, 2010 5:04 pm, Voytek Eymont wrote:
> On Sat, March 27, 2010 12:32 pm, Mark Martinec wrote:

> #grep local_domains_maps amavisd.conf
> @local_domains_maps = ( [".$mydomain"] );  # list of all local domains

> so, I need to list all my domains like:
> @local_domains_maps = ( [".$mydomain", "example2.com", "example3.com"] );

> as my domains are in MySQL, I guess I can put a MySQL call ?
> 'select domain from domain' ?

I've been looking at sql.readme and lookup.readme, I thought I'd 'just
enable' MySQL dsn from amavis, before I go further with it, so:

@lookup_sql_dsn =
   ( ['DBI:mysql:database=postfix;host=127.0.0.1;port=3306', 'zzzz',
'xxxx] );

database above is where I have virtual domains and users that postfix and
postfixadmin uses.

mysql> show tables;
+-----------------------+
| Tables_in_postfix     |
+-----------------------+
| admin                 |
| alias                 |
| config                |
| domain                |
| domain_admins         |
| fetchmail             |
| log                   |
| mailbox               |
| vacation              |
| vacation_notification |
+-----------------------+

then, I started amavisd debug, and, started getting various sql issues like:


Mar 27 17:57:04.941 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
lookup_sql "v...@dom.tld", query args: "ARRAY(0xa7d77a4)",
"ARRAY(0xd8039f0)", "ARRAY(0xcf0a0cc)", "ARRAY(0xced5a50)",
"ARRAY(0xd8125c4)", "ARRAY(0xd9a78c8)", "ARRAY(0xd9a78f8)"


Mar 27 17:57:04.942 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
lookup_sql select: SELECT users.*, policy.*, users.id FROM users LEFT JOIN
policy ON users.policy_id=policy.id WHERE users.email IN (?,?,?,?,?,?,?)
ORDER BY users.priority DESC

Mar 27 17:57:04.942 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01) sql
begin, nontransaction

Mar 27 17:57:04.943 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
Connecting to SQL database server

Mar 27 17:57:04.943 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
connect_to_sql: trying
'DBI:mysql:database=postfix;host=127.0.0.1;port=3306'

Mar 27 17:57:04.961 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
connect_to_sql: 'DBI:mysql:database=postfix;host=127.0.0.1;port=3306'
succeeded

Mar 27 17:57:04.962 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01) sql:
preparing and executing: SELECT users.*, policy.*, users.id FROM users
LEFT JOIN policy ON users.policy_id=policy.id WHERE users.email IN
(?,?,?,?,?,?,?) ORDER BY users.priority DESC

Mar 27 17:57:04.965 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
(!)lookup_sql: sql exec: err=1146, S1000, DBD::mysql::st execute failed:
Table 'postfix.users' doesn't exist at (eval 113) line 166, <GEN14> line
5., 1146, Table 'postfix.users' doesn't exist

Mar 27 17:57:04.966 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
(!!)TROUBLE in process_request: sql exec: err=1146, S1000, DBD::mysql::st
execute failed: Table 'postfix.users' doesn't exist at (eval 113) line
166, <GEN14> line 5. at (eval 114) line 280, <GEN14> line 5.

Mar 27 17:57:04.966 host.dom.tld /usr/sbin/amavisd[17556]: (17556-01)
(!)Requesting process rundown after fatal error




-- 
Voytek


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to