Setting up email sending/receiving on Mac OS X

postfix is the MTA (mail transfer agent) that takes email requests and forwards them on, eg to local mailbox or external MTA.
dovecot is a simple IMAP server

Installation:
brew install postfix
port install dovecot

Config files:
/System/Library/LaunchDaemons/org.postfix.master.plist (to start postfix at boot)
/etc/pam.d/dovecot (telling dovecot to use built-in authentication)
/etc/postfix/main.cf
/etc/aliases

Control:
sudo launchctl stop org.postfix.master; sudo launchctl start org.postfix.master
sudo pkill dovecot; sudo dovecot
sudo newaliases

Logs:
/var/log/mail.log

Testing:
printf  "From: John Swindells <john.swindells@example.com>\nTo: testuser@localhost\nSubject: Hi there\n\nThis is the email body\n" | /usr/sbin/sendmail -F "John S" -f "john.swindells@example.com" "testuser@localhost"


Comments

It's quiet in here...Add your comment