Q: DKIM for OS X Server's mail server
I'm trying to enable DKIM for OS X Server (Mountain Lion) just as easily as it was to do so in Lion Server.
I did try, based upon the 10.7 manual - changing to the new location, but I'm stuck at running amavisd showkeys
It tells me:
Config file "/etc/amavisd.conf" does not exist, at /Applications/Server.app/Contents/ServerRoot/usr/bin/amavisd line 1992.
OS X Server, 8GB, 2,93 GHz Intel Core 2 Duo
Posted on Sep 28, 2012 8:22 AM
To activate DKIM, first create the DKIM key (on the server):
sudo amavisd genrsa /etc/dkim_key
sudo chmod 644 /Library/Server/Mail/Config/amavisd/dkim_key
Copy your amavisd.conf file like so:
sudo cp /Library/Server/Mail/Config/amavisd/amavisd.conf /etc/
Then add something like the following to your /etc/amavisd.conf, while replacing example.com with your domain:
dkim_key('example.com', 'mail', '/Library/Server/Mail/Config/amavisd/dkim_key');
@dkim_signature_options_bysender_maps = ( { '.' => { a => 'rsa-sha256', ttl => 30*24*3600, c => 'relaxed/relaxed' } } );
Change the following line from:
$interface_policy{'10026'} = 'ORIGINATING';
to this:
$interface_policy{'10024'} = 'MYNETS';
To show your DNS key, run:
sudo amavisd showkeys
and include the output to your public DNS as a TXT record. Final step is to reload amavisd. Do not use "amavisd reload". You only have to kill the master process and it will restart in 10 sec. To find out the process id use something like this:
sudo ps aux | grep amavisd | grep master
sudo kill "PID#"
Posted on Oct 1, 2012 3:06 PM