It's often handy to dump off email to the local MTA rather than talking SMTP to a remote host directly. It's quicker, and logging is far superior to what Ubersmith provides.
This style of configuration is confirmed to work with:
From a shell application,
Copy your cacert.pem and paste it in /usr/local/ubersmith/conf/mail:
cd /usr/local/ubersmith/conf/mail; curl -L -O https://curl.haxx.se/ca/cacert.pemGo to the mail container:
cd /usr/local/ubersmith; docker-compose exec mail bashModify /etc/postfix/main.cf to uncomment and edit the following variables to the appropriate settings:
/etc/postfix/main.cf Configuration Options
|
Create /etc/postfix/sasl_passwd and generate sasl_passwd.db:
[smtp.office365.com]:587 smtp-user@example.com:password
postmap /etc/postfix/sasl_passwddocker cp ubersmith_mail_1:/etc/postfix/main.cf /usr/local/ubersmith/conf/maildocker cp ubersmith_mail_1:/etc/postfix/sasl_passwd /usr/local/ubersmith/conf/mail
docker cp ubersmith_mail_1:/etc/postfix/sasl_passwd.db /usr/local/ubersmith/conf/mail
Edit /usr/local/ubersmith/docker-compose.override.yml to add the following volumes to the mail service:
|
Recreate the mail container:
cd /usr/local/ubersmith; docker-compose up -d mail
Verify mail is flowing properly:
tail -f /var/log/ubersmith/mail/docker.log
These instructions also appear to work for relaying to Exim and postmarkapp.com.
This guide is functional on CentOS 6, which runs a pretty ancient version of Postfix – so it should hopefully also work with newer versions and OS'es.
yum install cyrus-sasl-plain
cd /etc/postfix; curl -L -O http://curl.haxx.se/ca/cacert.pem
Edit /etc/postfix/main.cf and include/update the following configuration options:/etc/postfix/main.cf Configuration Options
|
[smtp.office365.com]:587 smtp-user@example.com:password
postmap /etc/postfix/sasl_passwd
service postfix restart
On this page: |
Forwarding Emails
|