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'm trying to set postfix with MySQL authentication. I can send mails (from postfixadmin) to different domains. The problem is that I cannot send any mail to my domain or even log-in to squirrelMail even if I've created new user in postfixadmin.

When I send an email to my domain it logs an error:

Jan 31 10:47:17 server postfix/proxymap[4534]: warning: table "mysql:/etc/postfix/mysql_relay_domains_maps.cf": empty lookup result for: "domain.tld" -- ignored
Jan 31 10:47:17 server postfix/smtpd[4533]: NOQUEUE: reject: RCPT from nat-simple12.ntkcz.de[195.113.241.228]: 550 5.1.1 <test@domain.tld>: Recipient address rejected: User unknown in virtual mailbox table; from=<test@workround.org> to=<test@domain.tld> proto=ESMTP helo=<workaround.org>

If I try to login to squirrelMail it logs:

Jan 31 11:15:42 server imapd: LOGIN FAILED, user=test@domain.tld, ip=[::ffff:127.0.0.1]
Jan 31 11:15:47 server imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=54, sent=332

my /etc/postfix/main.cf contains:

...
# my configuration
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /home/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = virtual
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_overquota_bounce = yes
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf
...

I can't find any problem in my configuration. Does anybody see any problem or any direction I can move forward because I'm completely stuck.

Thanks, Mateo

share|improve this question

2 Answers 2

up vote 0 down vote accepted
Jan 31 10:47:17 server postfix/proxymap[4534]: warning: table "mysql:/etc/postfix/mysql_relay_domains_maps.cf": empty lookup result for: "domain.tld" -- ignored

That line is the first thing you need to solve. For some reason Postfix thinks that domain does not exist. I suspect that Postfixadmin is working correctly and you've entered the right domain, but you have a typo in /etc/postfix/mysql_relay_domains_maps.cf that is causing the lookup of the domain to fail.

share|improve this answer
    
I think that this warning is just an information. In "mysql_relay_domains_maps.cf" I have this query "query = SELECT d.description FROM domain AS d WHERE d. = '%s'". If I change the SELECT clause to "Select d.domain ...' it logs: "warning: do not list domain mydomain.com in BOTH virtual_mailbox_domains". Nevertheless these warnings are logged only if I send an email from postfixadmin. The login problem still holds...:-( –  user68786 Feb 2 '11 at 13:37
    
If Postfix can't deliver an email, the .maildir/ for the user won't be created. If the user does not have a maildir then various imap daemons do odd things. IIRC older versions of Courier would not log you in without a maildir. In any case if you're trying to get imap to work the problem is not in your Postfix config. –  kashani Feb 2 '11 at 18:00

The problem was indeed in my Courier not in postfix. I had a mistype in my /etc/courier/authdaemonrc. Where line

authmodulelist="authmysql"

was

authmodulelist="autmysql"
share|improve this answer

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.