The following instructions assume that Ubersmith has been installed to /usr/local/ubersmith and that Ubersmith is being configured to relay mail to Office 365. Be sure to use the specific relayhost
configuration for the provider you plan to have Ubersmith send mail to. Retrieve the latest copy of cacert.pem from curl.haxx.se and place it in /usr/local/ubersmith/conf/mail:
cd /usr/local/ubersmith/conf/mail
curl -L -O https://curl.haxx.se/ca/cacert.pem
Open a shell within the mail
container:
cd /usr/local/ubersmith
docker-compose exec mail bash
Within the mail
container, modify /etc/postfix/main.cf
to uncomment and edit the following variables to the appropriate settings:
/etc/postfix/main.cf Configuration Options
relayhost = [smtp.office365.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_send_dummy_mail_auth = yes
smtp_always_send_ehlo = yes
smtp_tls_security_level = may
smtp_use_tls = yes
smtp_tls_CAfile = /etc/postfix/cacert.pem
# debug options
# debug_peer_list = smtp.office365.com
|
Still within the container, create /etc/postfix/sasl_passwd
and generate sasl_passwd.db
:
- Edit /etc/postfix/sasl_passwd to contain the following:
- To generate /etc/postfix/sasl_passwd.db, run:
postmap /etc/postfix/sasl_passwd
Exit the container, and run:
Edit /usr/local/ubersmith/docker-compose.override.yml
to add the following volumes to the mail
service:
Recreate the mail
container:
Verify mail is flowing properly by examining the log output from the mail
container: