How to disable email notifications?

Since I installed foreman (and a smart-proxy), our mail-relay is filling up with undeliverable mails from foreman-proxy@foreman-server and foreman-proxy@smart-proxy, usually addressed to the respective address itself.
How does one disable this?

Expected outcome:

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
Foreman 2.5.2
Distribution and version:
CentOS 7

Does this work:


  1. In the Foreman web UI, navigate to Hosts > All Hosts, and select the host with the notification setting you want to change.
  2. Select the host’s check box, and from the Select Action list, select Enable Notifications or Disable Notifications, depending on what you want.

As pasted from here:

Ah, so it’s a per-host thing?

I thought there was a global setting…no wonder I couldn’t google it…

I’ve tried it now, we’ll see.


Maybe try this also:


  1. Navigate to Administer > Users.
  2. Click the Username of the user you want to edit.
  3. On the User tab, verify the value of the Mail field. Email notifications will be sent to the address in this field.
  4. On the Email Preferences tab, select Mail Enabled. - see can you do a global disable

OK, I did that.
But there’s still mails.

Mainly, they seem to be from smart-proxy-openscap-send

Though, the content seems mostly to be:

`/usr/share/foreman-proxy` is not writable.
Bundler will use `/tmp/bundler20210811-10979-1ojjt5o10979' as your home directory temporarily.
Your Gemfile lists the gem rsec (< 1) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.

Ah, so it’s not really an email notification but a cron job output. That lives in /etc/cron.d/tfm-rubygem-smart_proxy_openscap, the file is deployed by the installer. Given the job now prints the warning, it generates an email. Try adding MAILTO="" as a first line to that file to disable mailing of the output. The other option is to pipe the output to /dev/null.

I think there was some change in the packaging recently that started to cause these warnings. The same issue should be fixed for Foreman 3.0 - Bug #33013: bundler warns /usr/share/foreman is not writable - Foreman perhaps we need the same for all scripts/sub-projects. The thing it warns about is harmless but generating such emails wich every run can be pretty annoying.

@evgeni @ehelms @ekohl @upadhyeammit any thoughts?

1 Like

The warnings come from a newer Bundler in the SCL, which we have no control over (and the fix is for a CVE @lzap got some time back :sweat_smile:)

That said, yes, we should probably silence more outputs, but I wouldn’t know where to start.

1 Like