Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 =,
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

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[32399]: C9F70BB840: to=<email@mydomain.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-SIZE 10240000
250 DSN [733 ms]
MAIL FROM: <supertool@mxtoolbox.com>
250 2.1.0 Ok [733 ms]
RCPT TO: <test@example.com>
554 5.7.1 <test@example.com>: Relay access denied [733 ms]

SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost)
share|improve this question
You can make a quick test here : mxtoolbox.com/diagnostic.aspx to see if your mail server is answering, and what it is answering. –  Alexandre Lavoie May 15 '13 at 2:47
Hi I've added the mx toolbox output to the question thanks –  user173801 May 15 '13 at 9:09
Where are you sending mail from? Locally, externally? –  NickW May 15 '13 at 9:12
Hi, I'm sending mail externally –  user173801 May 15 '13 at 9:29
So from your PC to your server, then vs an external domain, correct? –  NickW May 15 '13 at 9:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.