DKIM

From Notes
Jump to navigation Jump to search

DKIM on OS X 10.10 ( Yosemite )

Pieced together from:
http://dmahajan.blogspot.com/2014/11/using-mac-os-x-server-for-your-own.html
https://discussions.apple.com/thread/3274110

So . .

In /Library/Server/Mail/Config/amavisd/amavisd.conf verify:

$enable_dkim_verification = 1; # enable DKIM signatures verification
$enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key

Generate Keys

sudo amavisd -c /Library/Server/Mail/Config/amavisd/amavisd.conf genrsa /Library/Server/Mail/Config/amavisd/dkim_key
sudo chmod 644 /Library/Server/Mail/Config/amavisd/dkim_key

In In /Library/Server/Mail/Config/amavisd/amavisd.conf Add:

dkim_key('domian.com', 'machinename', '/Library/Server/Mail/Config/amavisd/dkim_key');
@dkim_signature_options_bysender_maps = ( { '.' => { a => 'rsa-sha256', ttl => 30*24*3600, c => 'relaxed/relaxed' } } );

Time to set your DNS key, run:

sudo amavisd -c /Library/Server/Mail/Config/amavisd/amavisd.conf showkeys

and include the output to your forward zone(s) ( DNS ). If everything is set correctly then run:

sudo amavisd -c /Library/Server/Mail/Config/amavisd/amavisd.conf testkeys