First off, I have been using sendmail for about a week, and have a semi-working instance. This issue very well may be something simple/overlooked.

I have an AMI server that is running sendmail and dovecot. it is also the destination for a few email addresses at example.com. I have an external application that sends the mail as a user on this machine by connecting as a local user. I can define the FROM address to anything, fictional or otherwise.

If I have the domain example.com in /etc/mail/local-host-names, I can receive mail sent TO example.com to my local Maildir without getting the following error (loopback issue):

553 5.3.5 example.com. config error: mail loops back to me (MX problem?)

If I send a mail to be relayed with a FROM address @example.com, it does not get relayed, and is lost to the ether.

If I remove example.com from /etc/mail/local-host-names, I cannot receive mail to example.com (see error above), but I can relay mail that is being sent from my external application using domain example.com.

In a nutshell, I can either relay with a FROM @example.com with the etc/mail/local-host-names empty, or I can receive with a TO @example.com with the etc/mail/local-host-names populated. But I cannot receive AND send with either config.

What gives?

  • I'm getting confused. Where does the mailbox for example.com reside. Where do you want emails for example.com to go? – Mike B May 20 '16 at 17:33
  • Hey Mike. I have mailboxes for example.com all on the server. I want to receive email to these boxes to be fetched by IMAP later. I want emails TO example.com to be delivered here. I want emails sent FROM example.com to be sent out beyond this server, which is not happening. – TryingToHard May 20 '16 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.