[Tfug] Postfix - MySQL probllem

Jon bigj at flatwan.net
Tue Jul 20 12:53:37 MST 2004



John E.Morrow said:
> Greetings all,
>
> I am having an issue implementing postfix virtual mail domains with a
> MySQL backend.
> The database and config files seem to be okay. For instance, if I type
>
> postmap -q joeblow at virtual.dom mysql:/etc/postfix/database.cf
>
> it responds correctly with the location of the mail directory for
> joeblow.
>
> Furthermore, if I send mail from a local user to joeblow at virtual.dom,
> it goes through just fine. Here's the problem:
>
> If I send mail from the outside, it doesn't work. The mail server sees
> the message, tries to lookup the address in the database, but can't. I
> get some errors in syslog that look like this:
>
> Jul 20 06:43:17 cleverMailMachineName postfix/smtpd[15561]: warning:
> connect to mysql server localhost: Can't connect to local MySQL server
> through socket '/var/run/mysqld/mysqld.sock' (2)
> Jul 20 06:43:17 cleverMailMachineName postfix/smtpd[15561]: NOQUEUE:
> reject: RCPT from someguy at someplace: 451 <joeblow at virtual.dom>:
> Temporary lookup failure; from=<someguy at someplace>
> to=<joeblow at virtual.dom> proto=ESMTP helo=<someplace>
>
> well, something like this.
>
> I'm figuring there is a problem with the lookup, but I can't track it
> down. Anybody have any suggestions?
>
> BTW - postifix version 2.1.3, mysql version 4.0.18, debian testing
>
> Thanks,
>
> John Morrow
>
> _______________________________________________
> tfug mailing list
> tfug at tfug.org
> https://www.tfug.org/mailman/listinfo/tfug
>

Try changing your database.cf to read

hosts = 127.0.0.1

instead of 'localhost'. If this fixes it then you'll need to chase down
why the unix socket isn't working. Then you can let me know so I can fix
mine :)



--

Jon
"There are no smart viruses, just stupid users."


More information about the tfug mailing list