Admin email address

CMK version:
2.0.0p16.cre
OS version:
Debian 11
Error message:
I’ve installed postfix as MTA to send through smarthost and from CLI is working correcly

OMD[my_site]:~$echo "some text" | mail -s "mail test" my_email@mydomain.com

on /var/log/mail.log I can see correctly

Sep  1 14:24:58 srv-service postfix/pickup[748354]: 04E04249EB: uid=998 from=<my_site>
Sep  1 14:24:58 srv-service postfix/qmgr[458506]: 04E04249EB: from=<my_site@mydomain.com>, size=490, nrcpt=1 (queue active)

If I enable Notification instead on /var/log/mail.log i found

Sep  1 14:34:36 srv-service postfix/pickup[748354]: 72DE5249EB: uid=998 from=<my_site@srv-service.mydomain.local>
Sep  1 14:34:36 srv-service postfix/qmgr[458506]: 72DE5249EB: from=<my_site@srv-service.mydomain.local>, size=164995, nrcpt=1 (queue active)

I was expected to see checkmk notifications email from reporting@mydomain.com as per /omd/sites/refrion_site/etc/omd/site.conf

CONFIG_ADMIN_MAIL=‘reporting@mydomain.com’
CONFIG_APACHE_MODE=‘own’
CONFIG_APACHE_TCP_ADDR=‘127.0.0.1’
CONFIG_APACHE_TCP_PORT=‘5000’
CONFIG_AUTOSTART=‘on’
CONFIG_CORE=‘nagios’
CONFIG_LIVESTATUS_TCP=‘off’
CONFIG_LIVESTATUS_TCP_ONLY_FROM=‘0.0.0.0 ::/0’
CONFIG_LIVESTATUS_TCP_PORT=‘6557’
CONFIG_LIVESTATUS_TCP_TLS=‘on’
CONFIG_MKEVENTD=‘on’
CONFIG_MKEVENTD_SNMPTRAP=‘off’
CONFIG_MKEVENTD_SYSLOG=‘off’
CONFIG_MKEVENTD_SYSLOG_TCP=‘off’
CONFIG_MULTISITE_AUTHORISATION=‘on’
CONFIG_MULTISITE_COOKIE_AUTH=‘on’
CONFIG_NAGIOS_THEME=‘classicui’
CONFIG_NSCA=‘off’
CONFIG_NSCA_TCP_PORT=‘5667’
CONFIG_PNP4NAGIOS=‘on’
CONFIG_TMPFS=‘on’

My smarthost is accepting only email from mydomain.com so i don’t receive Notifications: any suggestion on how to change the from address?
Thanks in advance

The domain part srv-service.mydomain.local is very likely caused by domain (alias) in /etc/hosts file influencing the FROM address during HELO or EHLO connection.

I don’t have a solution (yet).

Having similar issues with sendmail smtp relay to smtp.office365.com which doesn’t accept my mail either. I was able to add an alias in hosts file so [domain].[tld] matches, but server hostname was added as subdomain which makes MS say SendAsDenied.
Maybe I can make it work by adding subdomain (wildcard) to MS as accepted domain, but not liking that workaround. So I currently parked the issue as something to figure out later.

As a workaround for the mean time I went for another maildomain not hosted by MS accepting mail from less ‘safe’ applications.
Not using Gmail myself, but they have options to allow their smtp to accept such mail. I believe their settings are called smtp overrides.

I’ve found the solution for change FROM address: from WATO Setup-Notification then under Global notification rules you can chage it!

1 Like

Thanks!
Will check it out after the weekend if this will work with MS issue as well, looks promising.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.