Hi,
thanks for answer.
The (=) (==) thing was fixed in the repository.
I have now more hints:
I configured the mailutil with the debug mode:
root@nds-router:~# head -n 10 /etc/icinga2/scripts/mail-host-notification.sh
PROG="basename $0
"
ICINGA2HOST="hostname
"
MAILBIN=“mail --debug-level=7”
/var/log/icinga2/icinga2.log
[2020-12-10 10:02:35 +0100] warning/PluginNotificationTask: Notification command for object ‘Switch 120’ (PID: 28662, arguments: ‘/etc/icinga2/scripts/mail-host-notification.sh’ ‘-4’ ‘192.168.200.120’ ‘-6’ ‘’ ‘-b’ ‘’ ‘-c’ ‘’ ‘-d’ ‘2020-12-10 10:02:35 +0100’ ‘-l’ ‘Switch 120’ ‘-n’ ‘Switch 120’ ‘-o’ ‘PING OK - Packet loss = 0%, RTA = 2.13 ms’ ‘-r’ ‘user@domain.de’ ‘-s’ ‘UP’ ‘-t’ ‘RECOVERY’ ‘-v’ ‘false’) terminated with exit code 36, output: mail: sendmail binary: /usr/sbin/sendmail
mail: Getting auth info for UID 111
mail: source=system, name=nagios, passwd=x, uid=111, gid=117, gecos=, dir=/var/lib/nagios, shell=/usr/sbin/nologin, mailbox=/var/mail/nagios, quota=0, change_uid=1
mail: Getting auth info for UID 111
mail: source=system, name=nagios, passwd=x, uid=111, gid=117, gecos=, dir=/var/lib/nagios, shell=/usr/sbin/nologin, mailbox=/var/mail/nagios, quota=0, change_uid=1
mail: mu_mailer_send_message(): using From: nagios@domain.de
mail: Sending headers…
mail: Sending body…
mail: /usr/sbin/sendmail exited with: 78
mail: progmailer error: Prozess wurde mit einem von Null verschiedenen Status beendet
mail: Nachricht kann nicht gesendet werden: Prozess wurde mit einem von Null verschiedenen Status beendet
mail: Getting auth info for UID 111
mail: source=system, name=nagios, passwd=x, uid=111, gid=117, gecos=, dir=/var/lib/nagios, shell=/usr/sbin/nologin, mailbox=/var/mail/nagios, quota=0, change_uid=1
Icinga2 send messages with the system user: nagios
Now!
The same command by use copy and past on bash cli from log but now as system user root:
mail: sendmail binary: /usr/sbin/sendmail
mail: Getting auth info for UID 0
mail: source=system, name=root, passwd=x, uid=0, gid=0, gecos=root, dir=/root, shell=/bin/bash, mailbox=/var/mail/root, quota=0, change_uid=1
mail: Getting auth info for UID 0
mail: source=system, name=root, passwd=x, uid=0, gid=0, gecos=root, dir=/root, shell=/bin/bash, mailbox=/var/mail/root, quota=0, change_uid=1
mail: mu_mailer_send_message(): using From: root@domain.de
mail: Sending headers…
mail: Sending body…
mail: /usr/sbin/sendmail exited with: 0
With system user root is al perfect!
For delivery email i use msmtp, I think that is the part of fail.
Later more …