On 2022-01-26 19:24, Ryan Kavanagh wrote:
On Wed, Jan 26, 2022 at 12:48:26PM -0800, Paul Pace wrote:
I'm trying to figure by going backwards where in the
Ubuntu/Debian/cron chain of packaging, configuring, compiling, or
coding this format actually comes from but I have a feeling this ends
up being a long goose chase.

Debsources [0] should help you catch the proverbial goose quickly
enough.

I'm guessing that the most likely source is line 507 of do_command.c in
the cron source package [1], unless it's getting set somewhere using
MAILFROM, in which case, likely [2]. There are a few other potential
matches [3].

Best,
Ryan

[0] https://sources.debian.org/
[1] https://sources.debian.org/src/cron/3.0pl1-137/do_command.c/?hl=507#L507 [2] https://sources.debian.org/src/cron/3.0pl1-137/debian/patches/features/Add-MAILFROM-environment-variable.patch/?hl=125#L125
[3] https://codesearch.debian.net/search?q=package%3Acron+Cron+Daemon
Very helpful!

I know very little about the depths of development work on these kinds of tools, and it looks like cron is maintained separately for each project, and had been somewhat neglected by Debian. That patch you linked was submitted with a bug (isn't that what every dev wishes for?) but then sat for three years.

Also learned that Debian uses GitLab for development work on "salsa".

Anyway, as best I can tell that patch made it to a salsa commit[1] and maybe it shows up one day in Ubuntu with the following new feature:

+If MAILFROM is defined, the sender email address is set to MAILFROM. Otherwise
+mail is sent as "root (Cron Daemon)".

So until then options are to fix it with the local MTA or just live with it.

Thank you,


Paul

[1] https://salsa.debian.org/debian/cron/-/commit/1d904fb79cfc732cdda0c45800258580c727555b

Reply via email to