I have postfix set up to use postfix/proxymap to store configs. I get this error when trying to end email.
Nov 9 06:18:33 mail postfix/pickup[16979]: D1A5E18F30: uid=2000 from=<rperkins>
Nov 9 06:18:33 mail postfix/cleanup[16981]: D1A5E18F30: message-id=<[email protected]>
Nov 9 06:18:33 mail postfix/proxymap[16982]: warning: connect to mysql server mysql01: Can't connect to MySQL server on 'mysql01' (111)
Nov 9 06:18:33 mail postfix/cleanup[16981]: warning: D1A5E18F30: virtual_alias_maps map lookup problem for [email protected] -- deferring delivery
Here is an example of my mysql-virtual_domains.cf file. I also have a mysql-virtual_email2email.cf, forwardings.cf and mailboxes.cf all set up similarly.
user = XXXXX
password = XXXXXXXXXX
dbname = mail
query = SELECT domain AS virtual FROM domains WHERE domain='%s'
hosts = mysql01
port = 6124
I'm wondering if its an issue with the port command. I cant seem to find anything online on how to set up postfix or sasl pam authentication using a non standard mysql port.
Try to specify the port as a part of the
hosts
line:You need to check your connection from your Postfix server (as in anttiR's comments). If you check it at your MySQL server, this makes a big difference. MySQL uses the (source) hostname of the connection source in it's authentication/authorization.
So XXXXX@localhost is a different user than XXXXX@mail.