1

I just finished following this tutorial to set up a postfix mail server on ubuntu 14.04:

https://www.digitalocean.com/community/tutorials/how-to-install-and-setup-postfix-on-ubuntu-14-04

When I tried sending an email to [email protected] from Gmail, nothing shows up in /var/mail. There is no file there. But when I send an email from [email protected] to the Gmail account, the email sends fine.

The tutorial doesn't go in-depth enough to know what's going wrong so I was hoping I could get an answer here.

3
  • Have you set up the MX records for your domain to point to your mail server?
    – Kinnectus
    Oct 18, 2014 at 19:37
  • @BigChris I have the following MX record set (I edited the true domain to example.com): i.imgur.com/g5OUZzV.png Oct 18, 2014 at 19:41
  • I believe the "target" should be your mail server public IP, not your domain. Don't forget to forward the right ports for your modem/router so that email requests go to your mail server. I would also make sure your mail server is given a static IP on your network.
    – Kinnectus
    Oct 18, 2014 at 19:45

1 Answer 1

1

This basic question is super old and should have been answered.

The sending from [email protected] succeeding makes no difference unless you were sending it via your SMTP server without a smart host. That would confirm that port 25 communication is open and working for outbound traffic to other SMTP servers.

First you want to test your SMTP server internally with any Telnet client. Microsoft has instructions and you might need to install the telnet feature if using Windows CMD: https://technet.microsoft.com/en-us/library/aa995718(v=exchg.65).aspx

If you were able to send mail successfully, make sure your SMTP server is accepting traffic from any IP address. Sorry I don't have steps for that.

Then check the following:

  • Is port 25 open to incoming traffic from other mail servers? Check your network firewall and internal software firewall. This will need to be open in order to receive mail to your SMTP server.
  • Is port 25 traffic going to your SMTP server? If you have multiple computers receiving traffic using one external IP address, make sure your port forwarding on the router is sending port 25 traffic to the correct internal IP address and port.
  • Make sure your MX record for your domain is pointing to the correct internet IP address where your server lives.

Here is the chain if you like visuals:

Gmail -> Domain's DNS -> MX record IP address (your modem) -> Router Firewall -> SMTP IP address:25

Then I recommend testing with telnet once again but via an outside internet connection.

1
  • I should have added, if port 25 is blocked by your ISP, some can be unblocked by calling a special number. Comcast can unblock 25 via modem configuration. If this is not an option, a mail reflector service will need to be used which is hosted by your DNS and can send port 25 traffic to another port and accept traffic on that port internally to then send out via port 25.
    – naps1saps
    Jun 20, 2019 at 1:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .