- Создатель Camille Marshall, отредактировано фев 25, 2020
Вы просматриваете старую версию данной страницы. Смотрите текущую версию.
Сравнить с текущим просмотр истории страницы
« Предыдущий Версия 3 Следующий »
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:
- Office 365 (364)
- Sendgrid
- Amazon SES
From a shell application,
Ubersmith Mail container for Ubersmith 4.x
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.pem
Go to the mail container:
cd /usr/local/ubersmith; docker-compose exec mail bash
Modify /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:
- Edit /etc/postfix/sasl_passwd to contain the following:
[smtp.office365.com]:587 smtp-user@example.com:password
- Run:
postmap /etc/postfix/sasl_passwd
- Exit the container, and run:
docker 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/maildocker cp ubersmith_mail_1:/etc/postfix/sasl_passwd.db /usr/local/ubersmith/conf/mail
Edit
/usr/local/ubersmith/docker-compose.override.ymlto add the following volumes to themailservice:-"/usr/local/ubersmith/conf/mail/cacert.pem:/etc/postfix/cacert.pem"-"/usr/local/ubersmith/conf/mail/main.cf:/etc/postfix/main.cf"-"/usr/local/ubersmith/conf/mail/sasl_passwd:/etc/postfix/sasl_passwd"-"/usr/local/ubersmith/conf/mail/sasl_passwd.db:/etc/postfix/sasl_passwd.db"Recreate the
mailcontainer:cd /usr/local/ubersmith; docker-compose up -d mail
Verify mail is flowing properly:
tail -f /var/log/ubersmith/mail/docker.log
Legacy Instructions for Ubersmith 3.x
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.
Install the cyrus-sasl-plain package (or equivalent for the OS in question):yum install cyrus-sasl-plain
Grab a copy of cacert.pem and drop it off in /etc/postfixcd /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 Optionsrelayhost = [smtp.office365.com]:587smtp_sasl_auth_enable = yessmtp_sasl_password_maps = hash:/etc/postfix/sasl_passwdsmtp_sasl_security_options = noanonymoussmtp_sasl_tls_security_options = noanonymoussmtp_send_dummy_mail_auth = yessmtp_always_send_ehlo = yessmtp_tls_security_level = encryptsmtp_use_tls = yessmtp_tls_CAfile = /etc/postfix/cacert.pem# debug options# debug_peer_list = smtp.office365.com
Edit /etc/postfix/sasl_passwd to contain the following:[smtp.office365.com]:587 smtp-user@example.com:password
Run:postmap /etc/postfix/sasl_passwd
Restart Postfix:service postfix restart
On this page:
Related Topics
Forwarding Emails
- Нет меток