On Fri 20 Oct 2023 at 11:51:35 (+0200), Gertjan Klein wrote: > Op 20-10-2023 om 05:10 schreef David Wright: > > On Thu 19 Oct 2023 at 13:30:53 (+0200), Gertjan Klein wrote: > > > I don't intend to send mail from this machine myself, I want mail from > > > the system (e.g. unattended-upgrades) delivered to my personal > > > mailbox. > > > > I wouldn't expect /then/ to see my name, or likely anything at all > > from /etc/passwd. Rather, I would expect system programs to set their > > own From: address, either read from configuration file or hard-wired > > into the program itself > > I wouldn't expect my gklein changes to be used by system mails either. > Just for fun, I did try to configure .mailrc for root, but that made > no difference (at least for unattended-upgrades). But the default > root@ address, with or without a name, is fine with me. I did have to > add a root@ mail alias in my provider settings though, otherwise it > rejects the system mail.
That may depend on what the Envelope-from address is, and the policy of your provider. As you might be able to observe, I use my ISP account for Envelope-from and authentication, and that account has no relation to accounts on my machine or my email hosting service. Such considerations may be the target of the header-rewriting facilities in nullmailer, exim, etc. > > It would be interesting to know whether the correct addresses were > > being generated by /system/ emails when you were still using > > mailutils; and whether they are, now that you're using bsd-mailx. > > II did not receive system emails when I was still using mailutils. I > reconfigured unattended-upgrades to always send mail, and forced a > run: > > $ sudo unattended-upgrade -d > > This gets me a mail with From being just "r...@parvos.nl". I don't > really mind. It's possible that the From: address could be different for each of the three or four cases: a manual run (as above), by cron, anacron, or by a systemd service. Cheers, David.