Postfix/smtpd hostname does not resolve to ip (but it does!)


I’ve been searching and reading through numerous posts, but can’t seem to find a resolution to my email issue.

I’m seeing the following in my logs, every few minutes;

Apr 10 23:53:50 toronto01 postfix/smtpd[2497]: warning: hostname does not resolve to address
Apr 10 23:53:50 toronto01 postfix/smtpd[2497]: connect from unknown[]
Apr 10 23:53:50 toronto01 postfix/smtpd[2497]: disconnect from unknown[]

I have reverse pointers setup and the hostname does resolve at mxtoolbox -->

I just can’t seem to figure out why this error occurs as the logs offer no real explanation. No rejected messages, or SASL login failed, etc., such as this entry;

Apr 10 23:59:42 toronto01 postfix/smtpd[2666]: warning: hostname does not resolve to address
Apr 10 23:59:42 toronto01 postfix/smtpd[2666]: connect from unknown[]
Apr 10 23:59:45 toronto01 postfix/smtpd[2666]: warning: unknown[]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 23:59:45 toronto01 postfix/smtpd[2666]: disconnect from unknown[]

I don’t know where this “connection” is coming from. It appears as if the server is connecting to itself, but for what reason and why it doesn’t resolve I just can’t understand.

Any pointers would be greatly appreciated!

Thanks; Kyle

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Everything was working, so this wasn’t urgent and I kinda back-burnered it for a while.

It seems I resolved it today when I ran into a discussion about setting up /etc/hosts and the purpose of That led me to this ->

From the Debian manual; For a system with a permanent IP address, that permanent IP address should be used here instead of

So, my hostname was resolving (as far as Postfix was concerned) to

Removing the line from /etc/hosts, so it looks like this;       localhost.localdomain           localhost        toronto01

and then restarting Postfix, has resolved the hostname verification errors I was seeing.

As a side note, I did have both smtp_host_lookup and lmpt_host_lookup = native before these changes to see if it would help. It did not, so I removed them both before restarting Postfix so the default settings (dns) would be used. It appears as these settings are not needed and can be left at their default values.

Hopefully it will help someone else.


Hi @kylestubbins

Add smtp_host_lookup = native to your That should make use of your /etc/hosts - if you have anything special setup there.

It’s just warnings, so it’s still working correctly. You can safely ignore that warning. When I run dig A 1799	IN	CNAME	1799	IN	A

I don’t think Postfix can handle multiple different returns. This should be an A-record instead of a CNAME, just to make sure we play nice with old mail servers.

And as for it does not resolve, so the warning is legit.

I’m suffering the same behaviour… the server can resolve without issues, but postfix keep showing this error. My /etc/hosts and host.conf are well configured, with “multi on” parameter also enabled.

warning: hostname does not resolve to address Name or service not known

What else should i check?

I know it’s a warning, but i’m afraid if i configure some restrictions this mail will not pass trough.


Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel