Page 1 of 1

CentOS and postfix with Nagios

Posted: Wed Nov 20, 2013 12:45 pm
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

Re: CentOS and postfix with Nagios

Posted: Wed Nov 20, 2013 1:34 pm
by slansing
Someone already has that covered from a google search:

http://www.telnetport25.com/2012/02/con ... gios-core/

Re: CentOS and postfix with Nagios

Posted: Thu Nov 21, 2013 6:34 am
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 ...

Re: CentOS and postfix with Nagios

Posted: Thu Nov 21, 2013 12:10 pm
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?

Re: CentOS and postfix with Nagios

Posted: Thu Nov 21, 2013 12:44 pm
by MPIvan
After configuring main.cf in postfix i try this ...
[root@mpnagios objects]# mail [email protected]
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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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=<[email protected]>, 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

Re: CentOS and postfix with Nagios

Posted: Thu Nov 21, 2013 4:58 pm
by abrist
Is ivandomain.local your smtp relay or postfix server?

Re: CentOS and postfix with Nagios

Posted: Fri Nov 22, 2013 6:35 am
by MPIvan
ivandomain is my domain ( local domain ).

Re: CentOS and postfix with Nagios

Posted: Fri Nov 22, 2013 9:51 am
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.