Struggling to configure sendmail right with email on same domain

CL40 asked:

I have a situation that probably unusual.

I run a handful of services I find useful at my domain example.com. example.com is pointed to my VPS server via A record and it’s associated services work fine (for example, ircd).

The only service I don’t run is mail through this server because I do not trust the reliability (nor security) of the company enough to do that. So I host my mail over at protonmail. I pointed the MX records in my domain to example.com properly, and I can indeed receive mail there.

The problem comes with my mail daemon on the server. I want to set up, among other things, tripwire to alert me of unusual activity on the server. Everything works fine up to the point where I do:

command | mail -s “subject from `uname -n`” [email protected]

Unfortunately, [email protected], which is a email, is getting confused for a local user (as indicated by error code 67). This is problematic because I don’t host my email through this server.

Is there any way I can create an alias for the user [email protected] to point to an email so I can receive email in my actual inbox rather than having to login and use mail? Strangely, fail2ban didn’t have these problems – I got a fail2ban started email when I set it up without issue.

My answer:


Your host’s hostname is set incorrectly. It should never be set to the naked domain name.

To solve the problem, rename the host, e.g. to www.example.com or anything containing a fully qualified domain name, and then restart sendmail.


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.