Getting a Postfix mail server working properly on Ubuntu
Hi everyone.
I'm relatively new to Linux with some experience in UNIX (Darwin/OS X and Solaris) and I'm trying to get a mail server running on Ubuntu 8.04 to send out emails from my web apps. Right now my focus is on actually SENDING mail, I'll worry about receiving properly when that matters to me. These apps in question (Rails apps) were on Solaris before, hosted on Joyent, and mail seemed to just work out of the box. Since I've never actually set up a mail server, I looked for a good guide and found one here: https://help.ubuntu.com/8.04/serverguide/C/postfix.html I followed it down to the letter, obviously only changing things like IP and domain names. Doing checks with http://www.mxtoolbox.com/ shows there are no issues, I have MX setup, RDNS, etc. The problem is I can't get any mail sent out. This is a quick snippet of the mail.info logs found in /var/log Code:
Mar 30 10:21:31 vn1111 postfix/smtp[28169]: connect to iname-com.mr.outblaze.com[208.36.123.59]:25: Connection timed out This is on a dedicated server, not a home thing with an ISP that likes to block/filter SMTP ports so that's not the culprit.. Anyone have any ideas? Thanks in advance, I've been Googling for hours. |
Can you maybe just tcpdump a test and see if it looks sane? Something like "tcpdump port 25" and then try sending another email.
- Arch |
Short sample of the output form tcpdump:
Code:
12:18:44.940379 IP vn1111.fireboxhosting.com.49115 > mail.hotmail.com.smtp: S 329455344:329455344(0) win 5840 <mss 1460,sackOK,timestamp 48015 0,nop,wscale 7> |
Quote:
- Arch |
Hmm, I can't telnet to any of those from the server in question. I can do it from my local computer though, but not from the server with the problem. Also I did the tcpdump again with the -v option real fast:
Code:
# tcpdump port 25 -v But we all know it's never that easy :-P |
Quote:
Okay, so you've got some network layer problem. Either network connectivity or a firewall. Test network connectivity for that system. I am guessing you're connecting to this system remotely so it should be okay. But can you please confirm? Ping the default gateway for that system, the DNS servers, and some random host Online (the OpenDNS servers are usually good for me: 208.67.222.222 and 208.67.220.220). Assuming that's fine, I think we can assume this is a firewall problem. Check that host's firewall first: Code:
iptables -L -v You can try generating smtp packets to see just which hop is dropping them with a utility like "hping". It's been a few years since I've had to use that though. - Arch |
Thanks for the reply, archangel.
A few things: I'm doing all of this from a Mac connected to the same network as the machine in question (in the datacenter) so I don't think it's something inherently wrong with the network, just with my abilities to pull this off without a hitch. The Mac itself (which I'm using to connect via SSH to the Ubuntu server) can do it all fine, I can send out test emails from there. Here's the IPTables output: Code:
# iptables -L -v |
All looks and sounds sane to me. This is usually a trivial setup. What about trying to connect to other mail systems? Try Google and a couple others, maybe it is just a coincidence the three networks you've tried aren't working for you ...
Other than that, not too sure. This is normally a pretty trivial setup... - Arch |
Tried using Sendmail and Citadel instead of Postfix, just for posterity.
Fail. It's definitely the fact that I can't connect to anything via port 25, no idea why. No other ideas? |
Quote:
- Arch |
All times are GMT -5. The time now is 01:51 PM. |