SSMTP officce 365 configuration

Started by chillyw13, March 29, 2017, 03:57:25 PM

Previous topic - Next topic

chillyw13

Using Debian Jessie with SSMTP as my relay server.  Netxms 2.0.8 Web Management Console.  Testing the SMTP relay from command line my emails send just fine.  However I am not getting any emails from netxms.  Here are my settings:

[email protected]
SMTPFromName=Netxms Server
SMTPRetryCount=1
SMTPServer=127.0.0.1

Is there something I have set wrong?

starkiller

Usually you can just use the o365 relay server as long as the external IP the emails are originating from is on the allow list for your domain.

chillyw13

So in other works you are saying I can use smtp.office365.com as my SMTPServer?  Do I also need to include the port?  e.g. smtp.office365.com:587

chillyw13

Well, apparently there is more to this.  I have tried the following SMTPServer settings to no avail:

localhost
127.0.0.1
smtp.office365.com
smtp.office365.com:587
mydomain-com.mail.protection.outlook.com
mydomain-com.mail.protection.outlook.com:587

Anyone?  Bueller?  Bueller?

Marco Incalcaterra

Quote from: chillyw13 on March 29, 2017, 06:59:11 PM
Well, apparently there is more to this.  I have tried the following SMTPServer settings to no avail:

localhost
127.0.0.1
smtp.office365.com
smtp.office365.com:587
mydomain-com.mail.protection.outlook.com
mydomain-com.mail.protection.outlook.com:587

Anyone?  Bueller?  Bueller?

If you specify localhost or 127.0.0.1 as address you should have a local SMTP server (installed on the same machine where NetXMS runs) to directly send the e-mails or to forward to the external server you want to use.
If you need to specify the port you can use the parameter "SMTPPort" (edit server configuration and add it if doesn't exists). As per my memory you cannot specify username/password to authenticate user, so, the only way is to whitelist the IP of the NetXMS server and configure mail server to allow unauthenticated access from that IP or relay through another server.

Useful post:
https://www.netxms.org/forum/feature-requests/smtp-authentication/
https://www.netxms.org/forum/configuration/custom-smtp-port-for-sending-emails/


Regards,
Marco

chillyw13

I finally got it to work, however it is only sending me a couple of alerts for nodes down even though there are several due to machines being turned off at night (desktops).  Is there a configuration somewhere that I have to specify per node whether to send alerts or is there a global for this?

Victor Kirhenshtein

All notifications controlled by your event processing policy. Make sure you have a rule for notifications on SYS_NODE_DOWN event without additional filtering on source node. If notification rule is correct, check that there were actually SYS_NODE_DOWN events for all nodes (you can tight click on node and choose "Event log" to see all events for that node).

Best regards,
Victor