Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Can you test the connection? nc -vz mysql01 6124 –  anttiR Nov 9 '11 at 7:05
    
I can connect through manually fine. –  The Digital Ninja Nov 9 '11 at 7:50
    
also use mysql client with the specified username/password ? –  anttiR Nov 9 '11 at 9:32
add comment

2 Answers

up vote 2 down vote accepted

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
share|improve this answer
    
A quick addition to quanta's answer: MySQL error 111 means "Connection refused". And more information about Postfix' MySQL configuration can be found here: postfix.org/mysql_table.5.html –  Vladimir Blaskov Nov 9 '11 at 10:01
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.