Solved

Mail notification

  • 13 February 2023
  • 8 replies
  • 285 views

Userlevel 1
Badge +6

Hello,

 

I’m configuring mail notification for my Centreon server, but I can’t receive mail after configuring Postfix. I tried few parameters from different tutorials but it still doesn’t work.

 

Logs : 

Feb 13 15:53:18 xxx postfix/qmgr[584413]: ED80F64CD1: from=<centreon-engine@xxx.xxx.xxx>, size=671, nrcpt=1 (queue active)
Feb 13 15:53:18 xxx postfix/qmgr[584413]: E905E64DF0: from=<centreon-engine@xxx.xxx.xxx>, size=731, nrcpt=1 (queue active)
Feb 13 15:53:18 xxx postfix/error[597488]: ED80F64CD1: to=<xxx@xxx.xxx>, relay=none, delay=719, delays=719/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.xxx.xxx[xxx.xxx.xxx.xxx]:25: Connection refused)
Feb 13 15:53:18 xxx postfix/qmgr[584413]: E722B64DCE: from=<centreon-engine@xxx.xxx.xxx>, size=671, nrcpt=1 (queue active)
Feb 13 15:53:18 xxx postfix/error[597695]: E905E64DF0: to=<xxx@xxx.xxx>, relay=none, delay=5939, delays=5939/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to smtp.xxx.xxx[xxx.xxx.xxx.xxx]:25: Connection refused)

 

I have changed few times my main.cf, and I put my own mail address on sasl_passwd.

 

Thanks and have a nice day.

 

 

icon

Best answer by aalz0 14 February 2023, 08:25

View original

8 replies

Userlevel 2
Badge +8

Hi, 

 

Have you try connecting to your mail server via Telnet?

Maybe is a server/firewall/proxy configuration error and not a Centreon issue...

Userlevel 1
Badge +6

Thanks for your answer.

 

I can’t connect to it with Telnet, but I can’t neither on my LibreNMS and I receive mails from it.
I’ll try to find how it works.

Userlevel 4
Badge +13

Does the test work? change as needed

echo "Test" | mail -s "Test" user@isp.com

from:

https://docs.centreon.com/docs/administration/postfix/

Userlevel 1
Badge +6

Logs I put in the first message where from :

echo "Test mail from postfix" | mail -s "Test Postfix" @mail
 

Userlevel 4
Badge +13

@StanislasR in that case looks like the “Connection refused” issue needs to be resolved

 

 

Userlevel 1
Badge +6

Yes, I’ll see but that’s probably a firewall rule issue but I currently can’t see that.

Userlevel 1
Badge +6

Mail is working now, the firewall rule for smtp was wrong.

 

Now, I’ve another issue, I have mail notification when hosts are up.

 

I’ve found on the Internet that it often happen and it’s a configuration issue but I can’t find what is wrong.

My ping check configuration :

$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -n $ARG3$

ARG1 : 300,50%
ARG2 : 500,100%
ARG3 : 5

 

And I have this configuration on my hosts :

!300,50%!500,100%!5

 

Something is wrong ?

 

Thanks and have a nice day.

Userlevel 1
Badge +6

Ok, problem solved, it was a mistake from me.

I had true mail alerts but the following parameter had not been set.

 

So I had host up alert for a real CPU/RAM threshold exceeded.

I changed interval between mail alerts too because it was flooding my mailbox.

Reply