I turned up verbose logging in Postfix and now I can see postfix trying to read sql-recipients. In mail.log I can see that it gets the user, password, hosts, dbname, table, select_field, and where_field. Everything seems fine there and then immediately below that there is a line that says...
"postfix/smtpd: mysql host_init: host=localhost, port=0, type=unix" Then several lines of I have no clue what there is a line that says... "warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)" Then it tries again and get's "Temporary lookup failure". Then the message Bounces to my systems postmaster, WHICH IS AN EMAIL ADDRESS IN THE MYSQL DBMAIL DATABASE. At the very end after the message is bounced there is a line that reads... "dbmail/smtp: sort.c, sort_and_deliver: message id=2, size=874 is inserted" Then postfix/pipe shows the message delivered. And sure enough if I look in the dbmail_messageblk table there is the bounced email transcript. So postfix can deliver to mysql after the message bounces. WHAT THE HECK! Please help. I think I am very close now.
