Score:1

Is it possible to change 'From: [email protected] (Cron Daemon)' to conform to RFC 5322 angle-addr or name-addr format?

us flag

When my server sends messages generated by cron jobs, the all have the following From: header:

From: [email protected] (Cron Daemon)

Based on answers in this Server Fault question I am concluding this is a legacy format that SHOULD NOT be used based on this note in RFC 5322 3.4.1:

Note: Some legacy implementations used the simple form where the addr-spec appears without the angle brackets, but included the name of the recipient in parentheses as a comment following the addr-spec. Since the meaning of the information in a comment is unspecified, implementations SHOULD use the full name-addr form of the mailbox, instead of the legacy form, to specify the display name associated with a mailbox. Also, because some legacy implementations interpret the comment, comments generally SHOULD NOT be used in address fields to avoid confusing such implementations.

Here are the above referenced specifications:

name-addr       =   [display-name] angle-addr
angle-addr      =   [CFWS] "<" addr-spec ">" [CFWS] /
                    obs-angle-addr
addr-spec       =   local-part "@" domain

Since postfix uses From: headers generated by other system daemons that conform to addr-spec, I am assuming this is some sort of an issue related to cron, but I may be wrong on that, as I am not clear how these are configured, but it is for all messages generated by cron jobs.

Is it possible to change the From: header to conform to the referenced specifications for cron jobs?

Score:0
us flag

It is not possible to change the From: address for cron jobs. This is hard-coded and it is specific to Debian cron.

A February 2021 commit to salsa includes a fix to optionally change the From: address.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.