This is going to be very short and sweet as it is primarily just a note to self. I stuggled with getting outbound mail delivery working for some time and finally got it all figured out. Using Exim4 for mail sending I did the following:

EDIT: This is a followup on a previous article for quickly getting Exim4 installed for mail sending. Read that article first here: Install Exim4 – One Command

1. Edit /etc/mailname and put in proper domain name for your server.

2. Edit this line in /etc/exim4/update-exim4.conf.conf

dc_other_hostnames='example.net'

3. Then run the command

update-exim4.conf

4. Then follow the instructions at this site to setup DKIM:
https://www.debian-administration.org/article/718/DKIM-signing_outgoing_mail_with_exim4

EDIT: I will note that the above article works except for the fact that they don’t show how to create a proper DKIM TXT record. The syntax should be along the lines of:

v=DKIM1; k=rsa; p=YouRKeYgOeSHere

The article left off the first part, i.e. “v=DKIM1;” which is required…

5. Finally create a txt record in DNS for your domain for SPF along the lines of:

v=spf1 mx a ip4:111.222.111.222/32

Optionally you can use this tool to generate an SPF record for you:
http://www.spfwizard.net/

Done!

References:
https://www.debian-administration.org/article/140/Handling_mail_for_multiple_virtual_domains_with_exim4

1 of 1

This post has no comments. Be the first to leave one!

Join the discussion

Your email address will not be published. Required fields are marked *