Le jeu. 1 févr. 2024 à 09:11, Martin-Éric Racine
<martin-eric.rac...@iki.fi> a écrit :
> > 1)
> >
> > MAILFROM= is supported for a long time, is it enough ?
> >
> > v1.5.18 : 2020-12-26
>
> Thanks. Good to know. It's not documented in the crontab(5) man page.

I added it now.
It matches cronie alternative implementation roughly at the same time
https://github.com/cronie-crond/cronie/commit/6181605fafe6aaedc0c19a8bdc85a335403b42d8

> Also, can this variable be configured in a file that is dropped into
> some directory, to avoid editing the global /etc/crontab? e.g.
> /etc/crontab.d/ or something similar?

/etc/crontab _is_ the main config file which other jobs
(like in /etc/cron.{d,hourly,daily,...}/ will inherit mailing settings from.
("std::optional<std::string> fallback_mailto;" in code)

/etc/sysconfig/crond & /etc/default/PACKAGE are old Redhat & Debian
things, mostly deprecated by systemd config drop-ins.

Maybe you'd want to read from /etc/aliases ?
I think this one is only for receiving email, not sending.

> > 2) _cron-failure should had been (re-)created by systemd-sysusers:
>
> helmi 01 06:20:08 p8h61 nullmailer-send[1286]: From:
> <_cron-fail...@iki.fi> to: <martin-eric.rac...@iki.fi>
>
> _cron-failure does not exist as a user on iki.fi (a public e-mail
> account e.g. gmail.com, hotmail.com), and therefore bounces.

_cron-failure is a technical user, it should never leaks into e-mail envelopes.
I'm using nullmailer myself but I can't reproduce it.

I'm off, I'll check again next week

Greetings

Reply via email to