Sending all system mails to an email address defined at cockpit

Good morning,
a short explanation of my wish:
At cockpit I set a mail address for receiving system mails. At the moment I have the following behaviour

  • backup info is sent to the mail address set at cockpit
  • update info is sent to root
  • @stephdl update info is sent to root, admin and administrator
  • @mrmarkuz and @danb35 update info is set to admin

My wish is to set the mail address for system mails at cockpit and every system mail is sent to this address.
Hope other people see it like me, I don’t want to the developers, who make a great job, to get more work only for a individual case.

For any questions just ask me.

Michael

The current configuration inside the Settings menu should do what you’re looking for.
The option configures a default recipient for root, so anything set to root should be sent there (like messages from cron).
Any program can override the settings.

So if you remove those settings, probably you should be able to use the global option.

Thanks for explanation Giacomo, so the question is, if it doesn’t make sense, that 3rd party repos like mrmarkuz, danb and stephdl sent also and only to root.
This is my opinion, of course I’m also open for other opinions.

The intention is to send an update mail to relevant accounts even if the global option is not set in System settings because Neth newbies don’t know the option and experienced users maybe don’t want cron mails.

To solve both issues, update mail to admin(istrator) in any case but without errors in maillog I suggest following change in /sbin/e-smith/check4*Updates:

MAILADDR="root"

id admin > /dev/null 2>&1 && MAILADDR+=" admin@$DOMAIN"
id administrator > /dev/null 2>&1 && MAILADDR+=" administrator@$DOMAIN"

This way admin and administrator only get a mail if they exist.

EDIT:

I updated the module for testing:

yum install https://mrmarkuz.dynu.net/mirror/devtest/nethserver-mrmarkuz-0.0.1-7.ns7.noarch.rpm

2 Likes