Problem:
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
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.