0

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=<20111109061833.D1A5E18F30@mail.listenerapproved.com>
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 dsw.ninjaboy@gmail.com -- 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.

The Digital Ninja
  • 764
  • 4
  • 10
  • 25

2 Answers2

3

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:

user = XXXXX
password = XXXXXXXXXX
dbname = mail
query = SELECT domain AS virtual FROM domains WHERE domain='%s'
hosts = mysql01:6124
quanta
  • 51,413
  • 19
  • 159
  • 217
  • A quick addition to quanta's answer: MySQL error 111 means "Connection refused". And more information about Postfix' MySQL configuration can be found here: http://www.postfix.org/mysql_table.5.html – Vladimir Blaskov Nov 09 '11 at 10:01
0

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.

mailq
  • 17,023
  • 2
  • 37
  • 69