TLS SMTP problem

Started by tiithe, October 09, 2013, 11:26:33 AM

Previous topic - Next topic

tiithe

Hi

I use Office 365 as mail service and i'm stuck now with mail configuration (NetXMS server is a Debian machine). I installed msmtp and configured it as was an example here in forum (link to sendmail and sendmail is renamed). From shell is mail sending working good and I recieve my testmail, but NetXMS says in event log that "SYS_SMTP_FAILURE"and "Unable to send e-mail to <blabla>: Communication failure."
I configured NetXMS as it seems to be right (SMTPServer tried both localhost and real IP).
Another suggestion here was to use scripts .. is there some example for they? NetXMS is a really cool system, but that mail problem is a showstopper for me right now.

Victor Kirhenshtein

Hi!

NetXMS server uses SMTP protocol to deliver mails. If it is unable to communicate with your post server directly, you can install local SMTP server (mail client is not enough), configure NetXMS to use 127.0.0.1 as SMTP server, and just forward everything from your local SMTP server to your real mail server. On Debian Postfix could be right choice. This is short document on how to configure Postfix to forward everything to mail gateway: http://marcelog.github.io/articles/configure_postfix_forward_all_email_smtp_gateway.html

Best regards,
Victor


tiithe

Quote from: Victor Kirhenshtein on October 09, 2013, 11:58:40 AM
Hi!

NetXMS server uses SMTP protocol to deliver mails. If it is unable to communicate with your post server directly, you can install local SMTP server (mail client is not enough), configure NetXMS to use 127.0.0.1 as SMTP server, and just forward everything from your local SMTP server to your real mail server. On Debian Postfix could be right choice. This is short document on how to configure Postfix to forward everything to mail gateway: http://marcelog.github.io/articles/configure_postfix_forward_all_email_smtp_gateway.html

Best regards,
Victor

Got it working with Exim4 (default MTA in Debian). If anybody wants .. here is what I did in exim4.conf file:

First, allow relay from localhost and my own LAN

hostlist relay_from_hosts = 127.0.0.1 : my.lan.ip.range/24

A new router to Router section (I named it send_to_gateway):

send_to_gateway:
  driver = manualroute
  domains = !+local_domains
  transport = ms_smtp
  route_list = * pod(your_Office365_smtp_server_number_here).outlook.com

Then a new transport in Transport section

ms_smtp:
  driver = smtp
  port = 587
  hosts_require_auth = $host_address
  hosts_require_tls = $host_address

And then new authenticator to Authenticators section (i commented out another authenticator, that used same public name, without that throw exim an configuration error):

smtp_login:
  driver = plaintext
  public_name = LOGIN
  hide client_send = : [email protected] : password

Filipp Sudanov