Nagios Notificatin by mail

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Notificatin by mail

Post by scottwilkerson »

that looks correct
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
michaelpn
Posts: 54
Joined: Fri Jul 14, 2017 12:12 am

Re: Nagios Notificatin by mail

Post by michaelpn »

Hi Scottwilkerson,

Sorry for delayed answer but I had an very important case to solve.

now I have fixed it. After a long consideration and troubleshooting I restarted postfix services and it helped:)
I mean how difficult can it be :)

=>
dig fg.dk mx

; <<>> DiG 9.9.5-3ubuntu0.17-Ubuntu <<>> fg.dk mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34426
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;fg.dk. IN MX

;; ANSWER SECTION:
fg.dk. 3600 IN MX 10 as.fg.dk.

;; ADDITIONAL SECTION:
as.fg.dk. 3600 IN A 172.xx.x.xxx
as.fg.dk. 3600 IN A 172.xx.x.xxx

:)

I have added "base" file with my domain IP but I still get the same !P 127.0.1.1

=>
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

vi /etc/resolvconf/resolv.conf.d/base

nameserver 172.xx.x.xxx
nameserver 172.xx.x.xxx
~
~
~
~
~
~
"/etc/resolvconf/resolv.conf.d/base" 2L, 48C

Do you have any idea about?

Best Regards
Michael Pierre Nielsen
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Notificatin by mail

Post by ssax »

If the MX lookup is failing, as a test you can edit your main.cf and change it from this:

Code: Select all

relayhost = fgmail3.fg.dk
To this:

Code: Select all

relayhost = [fgmail3.fg.dk]
And restart postfix and it will not do an MX lookup:

Code: Select all

service postfix restart
Let us know the results.
Locked