Skip to main content
Solved

Mail notification

  • February 13, 2023
  • 8 replies
  • 408 views

Forum|alt.badge.img+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.

 

 

Best answer by aalz0

Hi, 

 

Have you try connecting to your mail server via Telnet?

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

8 replies

Forum|alt.badge.img+8
  • Builder *
  • 62 replies
  • Answer
  • February 14, 2023

Hi, 

 

Have you try connecting to your mail server via Telnet?

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


Forum|alt.badge.img+6
  • Author
  • Steward **
  • 24 replies
  • February 14, 2023

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.


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • 531 replies
  • February 14, 2023

Does the test work? change as needed

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

from:

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


Forum|alt.badge.img+6
  • Author
  • Steward **
  • 24 replies
  • February 15, 2023

Logs I put in the first message where from :

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


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • 531 replies
  • February 22, 2023

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

 

 


Forum|alt.badge.img+6
  • Author
  • Steward **
  • 24 replies
  • February 23, 2023

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


Forum|alt.badge.img+6
  • Author
  • Steward **
  • 24 replies
  • March 6, 2023

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.


Forum|alt.badge.img+6
  • Author
  • Steward **
  • 24 replies
  • March 7, 2023

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.