| Linode Forum https://forum.linode.com/ |
|
| postfix not able to receive mail from outside https://forum.linode.com/viewtopic.php?f=11&t=8264 |
Page 1 of 1 |
| Author: | blasthaus [ Tue Jan 03, 2012 3:35 pm ] |
| Post subject: | postfix not able to receive mail from outside |
I'm having some serious frustration with postfix and would love some help. At this point I've followed several examples on the Linode docs but am still unable to receive ANY mail from an external sender. I can send mail from ssh but not receive it. I see nothing in the logs that indicates a mail coming in or even an attempt. Rather I am receiving bounces only hours or days after mails were sent. Bounces say Quote: The recipient server did not accept our requests to connect or Quote: No route to host
I've tried to set up Postfix on Ubuntu using this tutorial http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid and also on Fedora 15 using this tutorial http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-fedora-15-x86_64 and the same thing happens. I can send but not receive. If someone could possibly suggest something I would be extremely grateful as I've tried EVERYTHING to debug this but it's just not happening for me. Below are the postfix configs for each of the two sites. I think I have the DNS right, but I am not using mail.example.com but a FQDN with an A record (but no MX record) for the FQDN. Also I noticed that "mail" does appear in the MX record and my A record is below mail in the A records. Ubuntu postconf -n Code: alias_database = hash:/etc/aliases Fedora postconf -n Code:
|
|
| Author: | hoopycat [ Tue Jan 03, 2012 11:17 pm ] |
| Post subject: | |
On the Ubuntu side, at least, inet-interfaces is set wrong for receiving inbound mail. Quickest way to figure out what's wrong would be to post an example e-mail address that ought to work, then we can step through it from start to end to get the answer out. Otherwise, consider posting some logs or the output of "netstat -ntlp" and "iptables -L -n -v". |
|
| Author: | blasthaus [ Wed Jan 04, 2012 5:49 am ] |
| Post subject: | |
thanks a lot for taking a look! Quote: webmasterATpyramideclipse.com for fedora Code: Active Internet connections (only servers) log errors httpd/error_log Code: sh: /usr/sbin/sendmail: No such file or directory /var/log/maillog Code: Jan 1 03:26:39 example postfix/smtpd[20159]: fatal: open dictionary: expecting "type:name" form instead of "(i.e." I turned off local_recipient_maps which after finding these errors (it was somehow set to local_recipient_maps= (i.e. empty)) other than that I can't find anything relevant in the logs. Is there some way to see a log of each attempted incoming mail somewhere? -------------------------------------------------------------------------------------------------------------- Quote: for ubuntu adminATpyramideclipse.org Code: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name log errors Code: Jan 2 08:46:38 example postfix/smtpd[31185]: resolve_clnt: `' -> `webmaster@example.com' -> transp=`virtual' host=`example.com' rcpt=`webmaster@example.com' flags= class=v$ |
|
| Author: | hoopycat [ Wed Jan 04, 2012 3:22 pm ] |
| Post subject: | |
OK, on the Fedora machine, you have port 25 blocked by your firewall. Allowing port 25 connections inbound (identical to the rules you have for ports 22, 80, etc) will get that going. (The icmp-host-prohibited response is being interpreted as "No route to host".) On the Ubuntu machine, the firewall looks OK (i.e. completely open), but Postfix simply isn't listening on 0.0.0.0. Set inet_interfaces = all and you will probably start getting some mail! Neither of these situations would let incoming mail appear in your mail log, since they're rejected at the network level. I sent a couple test messages, which will spin around in my mail queue for awhile until they can be delivered. |
|
| Author: | blasthaus [ Wed Jan 04, 2012 4:25 pm ] |
| Post subject: | |
thanks again for your help! So I can't really figure out where to change my firewall settings. i looked at /etc/sysconfig/iptables but it says there not recommended to customize that file. do you have any recommendations? What tripped me up is 25 is listed as active in netstat and I wasn't aware that there is any default firewall on Fedora, because I didn't set one up. I'll try the inet_interfaces = all on the ubuntu machine. Thanks again for saving me here. this is my first time on linode! |
|
| Author: | hoopycat [ Thu Jan 05, 2012 2:41 pm ] |
| Post subject: | |
I got your reply to Test #2! (Which means my mail is working, too. I'd forgotten that I set that up...) I don't know too much about Fedora. However, with older RHELs, I recall there's a firewall tool in the "setup" command. It looks like the same is true with Fedora, and you can get there directly with "system-config-firewall". This might be out of date, though. |
|
| Author: | blasthaus [ Thu Jan 05, 2012 5:27 pm ] |
| Post subject: | |
great that one's fixed, many thanks i went ahead and just edited and the port is now open, so i'm seeing the incoming messages in the log, but all incoming messages are still being rejected my test email headers say Code: Diagnostic-Code: X-Postfix; mail for solar.example.com loops back to myself the maillog hopefully tells something but i cant' quite figure it. i've done so many things to try and get it to work that i'm thinking of just rebuilding the server from scratch Code: Jan 5 13:22:04 example postfix/trivial-rewrite[10701]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains |
|
| Author: | blasthaus [ Thu Jan 05, 2012 5:36 pm ] |
| Post subject: | |
also i just noticed this in message log Code: Jan 5 12:56:15 example postfix/smtpd[10519]: sql_select option missing here is my smtpd.conf Code: pwcheck_method: saslauthd |
|
| Author: | blasthaus [ Fri Jan 06, 2012 1:16 pm ] |
| Post subject: | |
so now it looks like i'm able to send and receive although i've yet to get any mails that bounced previously, only new incoming mails. problem i think was a combination of the ports not being opened in iptables and my conf file settings for sasl however, now i cannot for the life of me get IMAP or POP working so i can log in from an external mail client to retrieve mail. any tips on this? i'm using courier for imap obviously, not dovecot. also i just installed webmin to see if it can help, although it's my first time using it thanx huge! |
|
| Author: | hoopycat [ Fri Jan 06, 2012 2:33 pm ] |
| Post subject: | |
If the mails have bounced, they're gone unless the sender re-sends them. The "loops back to myself" thing is probably because solar.example.com is listed in neither mydestination nor virtual_mailbox_domains, so the mail server doesn't think it is responsible for handling it. However, when it tries to figure out which mail server is responsible via DNS, it finds that it is. So, it refuses the message since it can't do anything with it. There is another error that is a Problem: Code: Jan 5 13:22:04 example postfix/trivial-rewrite[10701]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains It is pretty much what it says it is: you can either use the virtual domain stuff for example.com, or the "traditional" stuff for example.com, but not both. You probably want the virtual domain stuff, so remove example.com from mydestination. I don't know too much about Courier/Dovecot, alas... I do know that when you have a problem and install Webmin to help fix it, you now have two problems. |
|
| Author: | blasthaus [ Sat Jan 07, 2012 3:37 pm ] |
| Post subject: | |
Ok so I corrected the virtual domain and still nothing until... I restarted mysql and whadayaknow, I am able to get emails using IMAP and POP. However I am not able to send them. I put relayhost = (blank) and it looks like SMTP AUTH is not working. Any pointers there? Mainly I'd like to be able to use relaying for mobile devices and as I understand it, SMTP AUTH will automatically whitelist an authenticated user to send mail for like 30 minutes after auth. SIDENOTE - MYSQLD problem restarting I should probably open another thread for this but, basically my mysql seems to be screwed up and I cannot restart mysqld. When I do 'service mysqld status' i get Code: Redirecting to /bin/systemctl status mysqld.service The only way I can restart mysqld is by killing the process and then 'service mysql start' when i restart, the messages logs gives me a bunch of this Code: Jan 7 11:19:56 example systemd[1]: Unit mysqld.service entered failed state. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|