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


3. Then run the command


4. Then follow the instructions at this site to setup DKIM:

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:

Optionally you can use this tool to generate an SPF record for you:



1 of 1

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

Leave a Reply