0

I've installed exim4 on my server to send email for server messages, registration messages, lost password messages etc.

My server's FQDN/rDNS is mail.example.com, which I also entered during the configuration of exim4 (dpkg-reconfigure exim4).

Emails are now sent from addresses like notification@mail.example.com. How can I change this to just notification@example.com?

I'm afraid that if I just enter example.com during exim4's configuration my emails will be marked as spam.

I do have a SPF record.

  • Could you include your configuration? An Exim expert will likely know some things to try without it, but can say for sure if they can see your full configuration. – Bill Weiss Jun 27 '14 at 4:31
2

On Debian, MTAs including Exim4 are configured to get the canonical domain from /etc/mailname. Mail clients (like mutt) are also supposed to read this file.

This means that you can have a sensible hostname and still get your mail sent out with your desired From: header field. Beware of having more than one host with the same value in their /etc/mailname files, because this means that they will each accept locally generated mail for this domain instead of sending it to the MX. You can probably edit your MTA config file or use dpkg-reconfigure exim4-config to avoid this.

If you prefer, you can put export EMAIL=me@example.com in your .profile. mutt will then use it in preference to /etc/mailname for the From: header field, but will still use the system mailname as the envelope sender. This is what you want, IMHO.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.