Wednesday, June 27, 2012

OSX,, and dovecot

OSX's can't seem to read files in /var/mail sent by, you guessed it: OSX itself. So, one can install dovecot from MacPorts and do a little configuration. First, set up a self-signed cert.
sudo mkdir -p /opt/local/etc/ssl/certs
sudo mkdir -p /opt/local/etc/ssl/private
sudo openssl req -new -x509 -nodes -config dovecot-openssl.cnf -out /opt/local/etc/ssl/certs/dovecot.pem -keyout /opt/local/etc/ssl/private/dovecot.pem -days 3650
Then, copy the example configuration
sudo cp /opt/local/etc/dovecot/dovecot-example.conf /opt/local/etc/dovecot/dovecot.conf
and make minor mods to dovecot.conf
sudo cp /opt/local/etc/dovecot/dovecot-example.conf /opt/local/etc/dovecot/dovecot.conf
sudo rcsdiff /opt/local/etc/dovecot/dovecot.conf
RCS file: /opt/local/etc/dovecot/dovecot.conf,v
retrieving revision 1.1
diff -r1.1 /opt/local/etc/dovecot/dovecot.conf
< #mail_location = 
> mail_location = /var/mail/%u
<     #args = dovecot
>     args = login
<     #args = 
>     args = 
And fire dovecot up
sudo port load dovecot

No comments: