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
/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
/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
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.