My company has set recently set up an Active Directory driven Microsoft Exchange environment to consolidate outgoing mails. We do have a set of staging servers which should now use our MSEXCHG as smarthost for outgoing mail.
These servers are located in the DMZ, which is why the upvoted solution in Authenticating to Exchange 2010 smarthost? is not an alternative, as we cannot allow a server in the DMZ to just send mails willy-nilly via our Exchange server.
Things we have done in MSEXCHG:
- Add a user (email@example.com)
Things we have done in
exim4_files (5)) we configured exim to use
exchange.contoso.com:587as a smarthost.
- In passwd.client (
exim4_files (5)) I have added the following line:
After starting exim with the configuration described above, I get the following two TLS errors in mainlog:
TLS error on connection to ex.contoso.com [192.168.1.8] (recv): A TLS packet with unexpected length was received.
TLS error on connection to ex.contoso.com [192.168.1.8] (send): The specified session has been invalidated for some reason.
Our MSEXCHG then refuses to send the mail and the following (ultimate) log entry shows up:
** firstname.lastname@example.org R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after MAIL FROM:<email@example.com> SIZE=1538: host ex.contoso.com [192.168.1.8]: 530 5.7.1 Client was not authenticated
Further things I have tried:
MAIN_TLS_ENABLE = 1into
- Steps described in https://askubuntu.com/questions/167043/how-do-i-configure-exim4-to-send-mail-through-a-password-protected-ssl-smtp-mail
So, obligatory question: How can we get exim to use our MSEXCHG environment as smarthost?