I am having some issues setting up Postfix to receive mail on Centos.
This is a web server that I'm setting up to only pipe mail to a php application so the server hostname is hostname.mydomain.com.
My main.cf file has the following config:-
myhostname = mail.hostname.mydomain.com mydomain = hostname.mydomain.com myorigin = $mydomain inet_interfaces = all inet_protocols = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks_style = host mynetworks = 188.8.131.52/28, 127.0.0.0/8 home_mailbox = Maildir/
I have setup a user and created a Maildir folder in /home/user/Maildir I have chowned it to chmod -R user:user /home/user/Maildir
I can telnet to port 25
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 mail.hostname.mydomain.com ESMTP Postfix
When I send mail i get logs in /var/log/maillog
May 15 01:40:26 hostname postfix/smtp: C9F70BB840: to=<email@example.com>, relay=mail.mydomain.com[x.x.x.x]:25, delay=0.42, delays=0.14/0/0.12/0.15, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as AE2B61A06B5)
However when I send an email it doesn't even show in the maillog.
My DNS is ok with an MX record for hostname.mydomain.com leading to mail.hostname.mydomain.com and an A record for mail.hostname.mydomain.com.
I just don't really know what I'm missing.
Any help is appreciated!
Mx toolbox output
220 mail.hostname.mydomain.com ESMTP Postfix SMTP Reverse Banner Check OK - x.x.x.x resolves to hostname.mydomain.com SMTP Reverse DNS Mismatch OK - Reverse DNS matches SMTP Banner SMTP TLS OK - Supports TLS. SMTP Connection Time 0.905 seconds - Good on Connection time SMTP Open Relay OK - Not an open relay. SMTP Transaction Time 3.214 seconds - Good on Transaction Time 220 mail.hostname.mydomain.com ESMTP Postfix [780 ms] EHLO please-read-policy.mxtoolbox.com 250-mail.hostname.mydomain.com 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN [733 ms] MAIL FROM: <firstname.lastname@example.org> 250 2.1.0 Ok [733 ms] RCPT TO: <email@example.com> 554 5.7.1 <firstname.lastname@example.org>: Relay access denied [733 ms] QUIT SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)