Page 2 of 2

Re: Nagios Notificatin by mail

Posted: Tue Sep 04, 2018 7:33 am
by scottwilkerson
that looks correct

Re: Nagios Notificatin by mail

Posted: Fri Sep 14, 2018 5:41 am
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

Re: Nagios Notificatin by mail

Posted: Fri Sep 14, 2018 2:37 pm
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.