CentOS and postfix with Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

CentOS and postfix with Nagios

Post by MPIvan »

Hi all,

have any one have experience with CentOS and postfix ... if you can help me im trying to run postfix as null client just to forward the notification to the main exchange server. I configure the postfix as it should be but i cant see notifications. If some can make some step by step tutorial on configuring it will be great
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CentOS and postfix with Nagios

Post by slansing »

Someone already has that covered from a google search:

http://www.telnetport25.com/2012/02/con ... gios-core/
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS and postfix with Nagios

Post by MPIvan »

This is for Ubuntu ... and i already have made a post for Ubuntu and postfix. I follow this post to make postfix as null client but no success to send a mail ...
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CentOS and postfix with Nagios

Post by slansing »

The only difference between Ubuntu and Centos in that guide is the repo manager, you can use YUM just the same. Have you been able to send mail from the CLI bypassing Core?
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS and postfix with Nagios

Post by MPIvan »

After configuring main.cf in postfix i try this ...
[root@mpnagios objects]# mail ivan@mydomain.com
Subject: test34
gd;flgjd;lfg
sdfsdf
.
EOT
[root@mpnagios objects]#
Also i try with telenetl localhost 25 etc and this is what iv got on log mail.
Nov 21 18:33:06 nagios postfix/smtp[4040]: connect to ivandomain.local[192.168.1.13]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4040]: connect to ivandomain.local[192.168.1.14]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[3990]: connect to ivandomain.local[192.168.1.16]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4040]: connect to ivandomain.local[192.168.1.16]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[3990]: connect to ivandomain.local[192.168.1.13]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[3990]: connect to ivandomain.local[192.168.1.14]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4041]: connect to ivandomain.local[192.168.1.16]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4041]: connect to ivandomain.local[192.168.1.13]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4041]: connect to ivandomain.local[192.168.1.14]:25: Connection refused
Nov 21 18:33:06 nagios postfix/smtp[4040]: 33CDA2A05DE: to=<nagios@ivandomain.local>, relay=none, delay=9323, delays=9323/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to ivandomain.local[192.168.1.16]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/smtp[3990]: 1A4AD2A0600: to=<nagios@ivandomain.local>, relay=none, delay=8928, delays=8928/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/smtp[4041]: 345612A05DF: to=<nagios@ivandomain.local>, relay=none, delay=9323, delays=9323/0.02/0.01/0, dsn=4.4.1, status=deferred (connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: AC6D72A0611: to=<nagios@ivandomain.local>, relay=none, delay=8845, delays=8845/0.04/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: AD26D2A060C: to=<nagios@ivandomain.local>, relay=none, delay=8845, delays=8845/0.04/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: 68F8A2A05FB: to=<root@ivandomain.local>, relay=none, delay=8961, delays=8961/0.05/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4045]: 7C9192A066A: to=<nagios@ivandomain.local>, relay=none, delay=1129, delays=1129/0.05/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: 7974F2A066D: to=<nagios@ivandomain.local>, relay=none, delay=1129, delays=1129/0.05/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: 7260C2A060D: to=<nagios@ivandomain.local>, relay=none, delay=8845, delays=8845/0.05/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4046]: 730B22A060A: to=<nagios@ivandomain.local>, relay=none, delay=8845, delays=8845/0.05/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: C9E402A05FF: to=<nagios@ivandomain.local>, relay=none, delay=8847, delays=8847/0.06/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4045]: C74DB2A0607: to=<nagios@ivandomain.local>, relay=none, delay=8847, delays=8847/0.05/0/0.01, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4044]: E22F92A0640: to=<nagios@ivandomain.local>, relay=none, delay=4729, delays=4729/0.06/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
Nov 21 18:33:06 nagios postfix/error[4046]: E34232A063D: to=<nagios@ivandomain.local>, relay=none, delay=4729, delays=4729/0.06/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ivandomain.local[192.168.1.14]:25: Connection refused)
And all this address are from other servers like dns etc ... and from my point of view ... connection refused is like postfix canot be authenticate with the mail server or when i try to find answers about this problem on the way of the pages :D i found that sendmail is default mail client for CentOS but i dont think that it works because. Im using CentOS 6.4
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CentOS and postfix with Nagios

Post by abrist »

Is ivandomain.local your smtp relay or postfix server?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS and postfix with Nagios

Post by MPIvan »

ivandomain is my domain ( local domain ).
MPIvan
Posts: 213
Joined: Thu Nov 22, 2012 6:09 am

Re: CentOS and postfix with Nagios

Post by MPIvan »

Ok i finally got it ... just follow the postfix documentation on null client and that is all, i have mixed somethings and start all over and now its ok .... tnx again.
Locked