Email alerts in 2.1-M1 not working?

Started by Tursiops, December 07, 2016, 08:24:26 AM

Previous topic - Next topic

Tursiops

Hi,

Email alerts on our system stopped working after we upgraded to NetXMS 2.1-M1 (which required an upgrade to Ubuntu 16 for JDK8 and was followed by an upgrade of Postgres to 9.5 - so plenty of changes).

The NetXMS configuration was pretty basic and meant to send emails through localhost. Manually sending via telnet works without a problem.
I increased debug logging on the server, monitored Postfix logs as well as NetXMS and found that Postfix does not even see a connection attempt from NetXMS.
NetXMS on the other hand gives me this (email address/server name/DCI data replaced):

[07-Dec-2016 17:13:48.650] [DEBUG] *actions* Executing action 4 ([Email] Standard Alert) of type SEND EMAIL
[07-Dec-2016 17:13:48.650] [DEBUG] *actions* Sending mail to EMAIL_ADDRESS: ""DCI_DESCRIPTION" is in state "NORMAL" - (Parameter: DCI_PARAMETER)"
[07-Dec-2016 17:13:48.655] [DEBUG] SMTP(0x7f5d6c2a3390): Failed to send e-mail, remaining retries: 4
[07-Dec-2016 17:13:48.656] [DEBUG] SMTP(0x7f5d6c2a3390): Failed to send e-mail, remaining retries: 3
[07-Dec-2016 17:13:48.656] [DEBUG] SMTP(0x7f5d6c2a3390): Failed to send e-mail, remaining retries: 2
[07-Dec-2016 17:13:48.656] [DEBUG] SMTP(0x7f5d6c2a3390): Failed to send e-mail, remaining retries: 1
[07-Dec-2016 17:13:48.657] [DEBUG] SMTP(0x7f5d6c2a3390): Failed to send e-mail, remaining retries: 0
[07-Dec-2016 17:13:48.657] [DEBUG] EVENT SYS_SMTP_FAILURE [22] (ID:4307970 F:0x0001 S:1 TAG:"") FROM SERVER_HOSTNAME: Unable to send e-mail to <EMAIL_ADDRESS>: Unable to resolve SMTP server name


I am not sure what there is to resolve for localhost or the IP 127.0.0.1 (I tested that as well). But either way, localhost does resolve locally without problems and telnet to localhost on port 25 works fine.

Has anyone else run into this?

Dani@M3T

There is a bug introduced in V2.1-M1,
see https://www.netxms.org/forum/general-support/problem-with-smtp-action-(maybe-since-v2-10-m1)/

use the IP address of the server instead for the moment.

best regards
Dani

Tursiops

Looks like we basically went through the same steps when running into this problem.
And yes, using the external IP of the server works (after reconfiguring Postfix to allow to relay).
Thanks for pointing that out. :)

Cheers


Dani@M3T

sorry I forgot to tell about the reconfigure part of postfix