This is a discussion on table lookup errors when postfix tries to read mysql virtual domain tables within the mailing.postfix.users forums, part of the Mail Servers and Related category; PROBLEM: postfix is delivering repetitive errors when trying to access the mysql backend for my virtual mail domains. Similarly, postfixadmin, ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
PROBLEM:
postfix is delivering repetitive errors when trying to access the mysql backend for my virtual mail domains. Similarly, postfixadmin, a PHP-based front end, reports an error accessing mysql when trying to create a new mailbox. Any suggestions would be appreciated. CONTENTS: 1. SUMMARY OF WHAT I AM DOING 2. ERROR LOG -- SYSLOG (postfix table error messages) 3. ERROR LOG -- POSTFIXADMIN (mysql error) 4. PARTS OF MAIN.CF 5. POSTFIX VIRTUAL MYSQL TABLE FILES 6. POSTFINGER --ALL OUTPUT 7. TELNET TO PORT 25 1. SUMMARY OF WHAT I AM DOING: I am trying to install Postfix with mysql, sasl, tls, and squirrelmail on an intel Freebsd 5.3 box. I am following verbatim the instructions found at http://www.wistful.net/~moon/my_free...ail_howto.html I have completed everything but the installation of squirrelmail. I don't believe squirrelmail has any involvement in the parts of the system which are causing me problems. I have googled this problem to no avail. It is not caused by a chrooted postfix which can be confirmed by reviewing the master.cf output from postfinger below. I have been able to log into mysql using the user name and password found in the various MYSQL_VIRTUAL_*_MAPS.CF virtual files used to tell postfix where to look for its virtual domain tables. (Those files are below.) I believe that I have misconfigured postfix somehow to incorrectly connect to mysql, but can't locate the problem. A telnet to port 25 invokes the postfix server, but it hangs. 2. ERROR LOG -- SYSLOG (postfix table error messages) postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem Jun 4 03:28:15 salmon postfix/trivial-rewrite[5017]: fatal: mysql:/usr/local/etc/ postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem Jun 4 03:28:40 salmon ctl_cyrusdb[5018]: checkpointing cyrus databases Jun 4 03:28:40 salmon ctl_cyrusdb[5018]: done checkpointing cyrus databases Jun 4 03:29:17 salmon postfix/trivial-rewrite[5019]: fatal: mysql:/usr/local/etc/ postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem Jun 4 03:30:18 salmon postfix/trivial-rewrite[5023]: fatal: mysql:/usr/local/etc/ postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem 3. ERROR LOG -- POSTFIXADMIN (mysql error) DEBUG INFORMATION: Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'goto,domain,created,modified,active) VALUES ('bobby@obitori.net','bobby@obitori.' at line 1 Please check the documentation and website for more information. This error is caused by trying to create an email mailbox for the obitori.net mail domain. The corresponding mailbox table in mysql is empty. Nonetheless, I can see the domains created by postfixadmin, so it is connecting to that table. 4. PARTS OF MAIN.CF queue_directory = /var/spool/postfix command_directory = /usr/local/sbin daemon_directory = /usr/local/libexec/postfix mail_owner = postfix mydestination = $myhostname, localhost.$mydomain local_recipient_maps = $alias_maps alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/local/sbin/sendmail newaliases_path = /usr/local/bin/newaliases mailq_path = /usr/local/bin/mailq setgid_group = maildrop virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_mailbox_limit = 10240000 virtual_transport = cyrus 5. POSTFIX VIRTUAL MYSQL TABLE FILES Below is an "ls" of my /etc/postfix directory and cats of the three virtual .cf files in it. One of the .cf files has a .db file with the same name, but the other two don't. I am unsure what this means. Again, I can log into mysql using: mysql -u postfix -p and type in the same password as in the .cf file. I have no problem connecting. /usr/local/etc/postfix$ ls LICENSE mysql_virtual_alias_maps.cf.db TLS_LICENSE mysql_virtual_domains_maps.cf access mysql_virtual_mailbox_maps.cf aliases post-install canonical postfix-files dist postfix-script generic prng_exch header_checks relocated main.cf salmon.cert main.cf.bak salmon.info main.cf.default salmon.key makedefs.out salmon.pem master.cf transport mysql_virtual_alias_maps.cf virtual /usr/local/etc/postfix$ cat mysql_virtual_alias_maps.cf user = postfix password = d0gmab@t159 hosts = localhost dbname = postfix table = alias select_field = goto where_field = address bud@salmon:/usr/local/etc/postfix$ cat mysql_virtual_domains_maps.cf user = postfix password = d0gmab@t159 hosts = localhost dbname = postfix table = domain select_field = description where_field = domain /usr/local/etc/postfix$ cat mysql_virtual_mailbox_maps.cf user = postfix password = xxxxxxxx hosts = localhost dbname = postfix table = mailbox select_field = username where_field = username 6. POSTFINGER --ALL OUTPUT postfinger - postfix configuration on Sat Jun 4 08:37:52 EDT 2005 version: 1.30 --System Parameters-- mail_version = 2.2.3 hostname = home.network uname = FreeBSD salmon.lake 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 --Packaging information-- looks like this postfix comes from BSD package: postfix-2.2.3_1,1 --Mailbox locking methods-- flock fcntl dotlock --Supported Lookup tables-- btree cidr environ hash ldap mysql pcre proxy regexp static unix --main.cf non-default parameters-- broken_sasl_auth_clients = yes command_directory = /usr/local/sbin daemon_directory = /usr/local/libexec/postfix local_recipient_maps = $alias_maps mailbox_transport = cyrus mailq_path = /usr/local/bin/mailq mydestination = $myhostname, localhost.$mydomain newaliases_path = /usr/local/bin/newaliases recipient_delimiter = + relayhost = outbound.mailhop.org:10025 sendmail_path = /usr/local/sbin/sendmail smtp_use_tls = yes smtpd_banner = $myhostname ESMTP Exim (3.2.1-r2) smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $mydomain smtpd_tls_auth_only = yes smtpd_tls_cert_file = /usr/local/etc/postfix/salmon.cert smtpd_tls_key_file = /usr/local/etc/postfix/salmon.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_use_tls = yes virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_limit = 10240000 virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_transport = cyrus --master.cf-- smtp inet n - n - - smtpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr tlsmgr unix - - n 1000? 1 tlsmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - n - - smtp relay unix - - n - - smtp -o fallback_relay= showq unix n - n - - showq error unix - - n - - error discard unix - - n - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} old-cyrus unix - n n - - pipe flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} cyrus unix - n n - - pipe user=cyrus argv=/usr/local/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}@{nexthop} uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) bsmtp unix - n n - - pipe flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient --Specific file and directory permissions-- drwx-wx--- 2 postfix maildrop 512 Jun 4 04:19 /var/spool/postfix/maildrop drwx--x--- 2 postfix maildrop 512 Jun 3 22:28 /var/spool/postfix/public total 0 srw-rw-rw- 1 postfix maildrop 0 Jun 3 22:28 cleanup srw-rw-rw- 1 postfix maildrop 0 Jun 3 22:28 flush prw--w--w- 1 postfix maildrop 0 Jun 4 08:37 pickup prw--w--w- 1 postfix maildrop 0 Jun 4 08:33 qmgr srw-rw-rw- 1 postfix maildrop 0 Jun 3 22:28 showq drwx------ 2 postfix wheel 512 Jun 3 22:28 /var/spool/postfix/private total 0 srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 anvil srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 bounce srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 bsmtp Srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 cyrus srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 defer srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 discard srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 error srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 ifmail srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 lmtp srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 local srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 maildrop srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 old-cyrus srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 proxymap srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 relay srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 rewrite srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 scache srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 smtp srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 tlsmgr srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 trace srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 uucp srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 verify srw-rw-rw- 1 postfix wheel 0 Jun 3 22:28 virtual -rwxr-sr-x 1 root maildrop 135164 May 25 18:06 /usr/local/sbin/postdrop -rwxr-sr-x 1 root maildrop 126147 May 25 18:06 /usr/local/sbin/postqueue --Library dependencies-- /usr/local/libexec/postfix/smtpd: /usr/local/libexec/postfix/smtpd: libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x280c6000) libpam.so.2 => /usr/lib/libpam.so.2 (0x280da000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x280e1000) libssl.so.3 => /usr/lib/libssl.so.3 (0x280f9000) libcrypto.so.3 => /lib/libcrypto.so.3 (0x28127000) libdb-4.3.so.0 => /usr/local/lib/libdb-4.3.so.0 (0x2821c000) libm.so.3 => /lib/libm.so.3 (0x282e7000) libz.so.2 => /lib/libz.so.2 (0x28301000) libldap-2.2.so.7 => /usr/local/lib/libldap-2.2.so.7 (0x28311000) liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7 (0x2833d000) libpcre.so.0 => /usr/local/lib/libpcre.so.0 (0x28349000) libc.so.5 => /lib/libc.so.5 (0x28354000) -- end of postfinger output -- 7. TELNET TO PORT 25 # telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 salmon.lake ESMTP Postfix ehlo bud.org 250-homenetwork.net 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250 8BITMIME Thanks! Bud Roth Lake Barcroft, VA |