Attivazione dell'autenticazione SMTP per la spedizione del server Zimbra dalla 8.5 in poi.
Setting a relay host
zmprov ms server.domain.com zimbraMtaRelayHost mailrelay.example.com
Enabling SMTP authenticatio
zmprov ms <server> zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/conf/relay_password
echo mailrelay.example.com username:password > /opt/zimbra/conf/relay_password
postmap /opt/zimbra/conf/relay_password
To test that the lookup table is correct, the following should return username:password:
postmap -q mailrelay.example.com /opt/zimbra/conf/relay_password
zmprov ms <server> zimbraMtaSmtpSaslAuthEnable yes
zmproc ms <server> zimbraMtaSmtpCnameOverridesServername no
Enable TLS
As Zimbra user:
postconf -e smtp_tls_security_level=may zmprov ms <server> zimbraMtaSmtpTlsSecurityLevel may
After sending a test message, check the Log Files for the error:
(Authentication failed: cannot SASL authenticate to server ...: no mechanism available)
zmprov ms <server> zimbraMtaSmtpSaslSecurityOptions noanonymous
Es:
echo "$RELAYHOST $USER:$PASSWORD" > /opt/zimbra/conf/relay_password
zmprov ms $ZIMBRAHOST zimbraMtaRelayHost $RELAYHOST
postmap lmdb:/opt/zimbra/conf/relay_password
zmprov ms $ZIMBRAHOST zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/conf/relay_password
zmprov ms $ZIMBRAHOST zimbraMtaSmtpSaslAuthEnable yes
zmprov ms$ZIMBRAHOST zimbraMtaSmtpCnameOverridesServername no
zmprov ms $ZIMBRAHOST zimbraMtaSmtpSaslSecurityOptions noanonymous
zmcontrol restart
Ciao Luca