You are not logged in.
I have setup a mail server with Postfix and Dovecot.
These commands WORK from another machine (from within the same home network then that of the mail server, if this is relevant) :
$ telnet example.com 25
$ mail user@example.com
The MX records seem right to me.
$ dig mydomain.com MX
example.com. 157 IN MX 10 mx1.example.com.
example.com. 157 IN MX 20 mx2.example.com.
mx2.example.com. 1205 IN A 111.111.111.111
mx1.example.com. 1205 IN A 111.111.111.111
It seems like port 25 is open and accessible from the outside since the command mail user@example.com works from another machine. However, I am unable to receive email sent from Gmail or Outlook. What could be the reason?
Offline
You need to check if port 25 is accessible from the Internet. Testing from another machine on the same network won't yield any useful results.
Offline
AFAIK you need an encrypted connection for taking with Gmail. try setting up STARTTLS for your postfix.
Every time I see some piece of medical research saying that caffeine is good for you, I high-five myself. Because I'm going to live forever. -- Torvalds, Linus (2010-08-03).
Offline
Are you setting up your mail server on a real domain? Or using a dynamic DNS? If you're using the latter you're out of luck as you will be blocked by spam filters/your isp. Otherwise it looks like you cannot access the smtp service outside of your network. Like others have mentioned above, check your firewall. With iptables its as simple as (as root):
iptables -nvL
Offline