mail server receiving email from remote telnet session but not from gmail

StevieD asked:

I successfully sent mail via telnet port 25 from my local machine to my remote server running postfix/dovecot. The email successfully landed in the user’s mailbox on the machine.

However, when trying to send a mail to the same user using gmail, there is no trace of the email.

main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = example.com
mydomain = example.com
mydestination = $myhostname, ip-173-31-0-112.ec2.internal, localhost.ec2.internal, localhost, $mydomain, localhost.$mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

the mail server is at mail.theomnihealthgroup.com. The telnet session is here:

Trying 3.95.150.105...
Connected to mail.theomnihealthgroup.com.
Escape character is '^]'.
220 mail.theomnihealthgroup.com ESMTP Postfix (Debian/GNU)
ehlo mail.theomnihealthgroup.com
250-mail.theomnihealthgroup.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
mail from: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: check it

awesome
.
250 2.0.0 Ok: queued as B03C9802BF
quit
221 2.0.0 Bye
Connection closed by foreign host

My answer:


Your MX record is incorrect.

$ host -t mx theomnihealthgroup.com
theomnihealthgroup.com mail is handled by 1 mail.

But your mail server is at mail.theomnihealthgroup.com.

Edit your DNS MX record to correct this.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.