NetXMS Support Forum

English Support => General Support => Topic started by: Azur on June 10, 2022, 10:56:22 AM

Title: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Azur on June 10, 2022, 10:56:22 AM
Hi everyone.
Hope you are having a great day, and the weekend will be even better !

I am trying to set up email notifications every time a specific alarm is logged. The alarm it self does get logged in NetXMS but I am stuck at sending this alarm to my gmail.

I am aware NetXMS does not support SMTP authentication so I have set up hMailServer locally on the same server as where NetXMS is located.
I am not sure if my hMailServer configuration is wrong, or I am doing something wrong in the NetXMS it self but I keep getting "Driver error" in Notification Channels inside NetXMS.

I am posting pictures of NetXMS configuration and hMailServer hoping those will help you understand the issue.

Thank you in advance,
Azur
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Filipp Sudanov on June 10, 2022, 12:02:55 PM
If you double-click on the notification channel, what settings will be available there?
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Azur on June 10, 2022, 12:24:02 PM
Thanks for the quick reply.
Here :
Server=localhost
RetryCount=5
Port=25
LocalHostName=IT-SERVER
FromName=NetXMS Server
[email protected]
MailEncoding=utf8
IsHTML=yes
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Filipp Sudanov on June 10, 2022, 04:57:21 PM
Configuration looks correct (except for RetryCount=5 - it's now taken from a global server variable).

Most probably there is some issue with your mail relay software. I've successfully used https://sourceforge.net/projects/emailrelay/, you may try this as well.

You can simply test your email relay like this:

telnet localhost 25
EHLO localhost
MAIL FROM: <[email protected]>
RCPT TO: <[email protected]>
DATA
From: [email protected]
To: [email protected]
Subject: test email

test body
.
quit
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Filipp Sudanov on June 10, 2022, 04:59:03 PM
Also, for testing you can use Tools->Send notification menu.
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Azur on June 13, 2022, 10:51:47 AM
I tried testing it via Send notification menu, and I get the notification saying "Notification to [email protected]" has been enqueued.

I checked the hMailServer logs -> everything looks fine there as if the message goes through.

I still do not get the email to my inbox.

Any suggestions ?

Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Victor Kirhenshtein on July 04, 2022, 07:56:40 PM
From what you show it looks like mail relay successfully received mail from netxmsd, so if you didn;t receive it it was either not sent by relay, or rejected/dropped by receiving server. Do you have any logs from relay regarding forwarding of this mail?

Best regards,
Victor
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Azur on July 05, 2022, 09:41:53 AM
Hi,

Yes, the problem was in the mail Server itself.
I have added a gmail to the mail Server while desperately trying to send the email to it.
Do not add your real-emails to mail servers.
That solved my problem.

Thanks for all the help,
cheers.
Title: Re: Configuring sending email on Alert creation (NetXMS + hMailServer)
Post by: Filipp Sudanov on May 22, 2023, 05:58:42 PM
SMTP Authentication was added in 4.3, please see updated documentation: https://www.netxms.org/documentation/adminguide/event-processing.html#notification-channels