| Linode Forum https://forum.linode.com/ |
|
| Postfix not able to send mail https://forum.linode.com/viewtopic.php?f=11&t=1601 |
Page 1 of 1 |
| Author: | lpfavreau [ Sun Apr 03, 2005 12:39 am ] |
| Post subject: | Postfix not able to send mail |
Me, a great newbie, need help with Postfix. 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: Code: telnet mymailserver.domain.org 25 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! |
|
| Author: | lpfavreau [ Sun Apr 03, 2005 1:10 am ] |
| Post subject: | And mail... |
Also, the 'mail' program does not send mail, whatever the address is, locally or externally. |
|
| Author: | pclissold [ Sun Apr 03, 2005 6:02 am ] |
| Post subject: | |
If there is nothing useful in the mail error log, try turning on verbose logging - add the parameter -v to the line in master.cf that invokes the smtp service of type inet and then restart postfix. |
|
| Author: | TehDan [ Sun Apr 03, 2005 6:12 am ] |
| Post subject: | |
As previous poster said, check your /var/log/mail.log and I'd also look at /var/log/mysql/ I suspect the DB lookup is failing for some reason. There are numerous possibilities, judging by the guide you followed, my first guess (this is what caught me out) would be that postfix is running chrooted (which it generally does), so it can't access MySQL via the file socket - you'll probably need to contact it via the network socket. 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. |
|
| Author: | lpfavreau [ Sun Apr 03, 2005 10:55 am ] |
| Post subject: | Log |
In my mail.err I now have: Code: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,100): table lookup problem Numerous times. Also, in mail.log: Code: 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) |
|
| Author: | lpfavreau [ Sun Apr 03, 2005 10:57 am ] |
| Post subject: | Ok, and an alternative? |
Seems you two are right. But what's best? Not to run the daemon chrooted or to open the socket in the firewall? |
|
| Author: | lpfavreau [ Sun Apr 03, 2005 11:17 am ] |
| Post subject: | Lookup failure |
Ok, I've made the trivial-rewrite not run chrooted and now I can go a little further. Code: Trying xx.xx.xx.xx... I'm still working on it but if you have any ideas, they're welcome! Why the 451 error? |
|
| Author: | lpfavreau [ Sun Apr 03, 2005 12:07 pm ] |
| Post subject: | Chrooted |
Now I've made run not-chrooted the 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! |
|
| Author: | SteveG [ Tue Apr 05, 2005 7:03 pm ] |
| Post subject: | Cool trick for chroot access. |
I didn't want to setup a 127.0.0.1 socket for mysql (although that's a fairly reasonable solution, and I didn't want to run postfix outside a chroot(), and eventually this popped into my head: 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.) |
|
| Author: | lpfavreau [ Wed Apr 06, 2005 8:48 am ] |
| Post subject: | Wow! |
Very nifty! Works great with Debian, thanks! |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|