Postfix not able to send mail
I'm running Debian and I've installed postfix and postfix-mysql to do some alias work. I've created the corresponding tables and put the virtual-… lines in my main.cf file. I've used in good part the following howto: http://high5.net/howto/
Now, the postfix server is running and my firewall is open to SMTP. When I do the following:
telnet mymailserver.domain.org 25
Trying xx.xx.xx.xx...
Connected to mymailserver.domain.org.
Escape character is '^]'.
220 mymailserver.domain.org ESMTP Postfix (Debian/GNU)
helo mydomain.com
250 mymailserver.domain.org
mail from: <>
250 Ok
rcpt to: <whatever@domain.org></whatever@domain.org>
And it stops here: no confirmation, no error message, no timeout (yet). Same thing if I put an address in the 'mail from' field. It works when I specify no email address, it tells me to write a valid email address if I input a wrong one but if the address is valid, it seems like it tries to compare it to something and it freezes there.
I guess it's something stupid I'm missing as I'm a mail server newbie but my searches in Google haven't returned anything helpful yet.
Does it ring a bell for anyone out there?
Thanks!
9 Replies
This means first checking mysql is set up to listen on a network socket, (beware of the security issues with this) and then editing the 4 mysql…cf files you created so hostname is a hostname associated with your IP address in /etc/hosts and not localhost.
fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem
Numerous times. Also, in mail.log:
postfix/trivial-rewrite[2845]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
postfix/trivial-rewrite[2845]: fatal: mysql:/etc/posfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem
Trying xx.xx.xx.xx...
Connected to mymailserver.domain.org.
Escape character is '^]'.
220 mymailserver.domain.org ESMTP Postfix (Debian/GNU)
helo test.com
250 mymailserver.domain.org
mail from: <test@test.com>250 Ok
rcpt to: <you@otherdomain.com>554 <you@otherdomain.com>: Relay access denied
rcpt to: <me@mymailserver.domain.org>451 <me@mymailserver.domain.org>: Temporary lookup failure</me@mymailserver.domain.org></me@mymailserver.domain.org></you@otherdomain.com></you@otherdomain.com></test@test.com>
I'm still working on it but if you have any ideas, they're welcome!
Why the 451 error?
smtp
pickup
cleanup
rewrite
And it seems I can send mail. Great!
Now, is there any security risks associated with unchrooting the previous service?
Also, it seems to reject mail from unknown domain. Is it a little bit to restrictive? I know it is good not to relay mail to unknown domain but from unknown domain, what if the domain is new?
Thank you for your help!
mkdir /var/spool/postfix/var/run/mysqld
mount -o bind /var/run/mysqld /var/spool/postfix/var/run/mysqld
Bind mounts allow you to make a directory tree show up somewhere else. Nifty, eh? If you go this route, don't forget to add a entry in
/etc/fstab, so it last over a reboot:
/var/run/mysqld /var/spool/postfix/var/run/mysqld auto bind 0 0
(the above paths are for Debian, don't know what RH et. al. do with mysql socket paths.)
Works great with Debian, thanks!