26.09.14

[CentOS 6] Office 365 als SMTP relay für Postfix nutzen

Benötigte Pakete installieren:
yum install postfix cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain

Relayhost konfigurieren:
postconf -e 'relayhost = smtp.office365.com:587'

TLS Verschlüsselung aktivieren:
postconf -e 'smtp_tls_security_level=encrypt'

IPv6 als Internet Protokoll deaktivieren:
postconf -e 'inet_protocols=ipv4'


Authentifizierung aktivieren, auth mapping Datei erstellen und in auth Datenbank konvertieren:
postconf -e 'smtp_sasl_auth_enable = yes'
postconf -e 'smtp_sasl_security_options = noanonymous' 
postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd'
echo "smtp.office365.com user@domain.com:password" > /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

Namenszuordnung erstellen um zu erreichen, dass Exchange Mails annimmt:
postconf -e 'canonical_maps = hash:/etc/postfix/canonical'
vi /etc/postfix/canonical
root    nagios@netbiscuits.com
postmap /etc/postfix/canonical

Keine Kommentare: