On 09 Dec 2020, at 03:00, Chris Green <c...@isbd.net> wrote: > On Wed, Dec 09, 2020 at 02:33:37AM -0700, @lbutlr wrote: >> On 08 Dec 2020, at 13:04, Chris Green <ch...@isbd.co.uk> wrote: >>> On Tue, Dec 08, 2020 at 12:39:07PM -0700, @lbutlr wrote: >>>> On 08 Dec 2020, at 10:56, Chris Green <c...@isbd.net> wrote: >>>>> While I can look through the E-Mail header to see where the message >>>>> has come from it would be good if I could somehow configure things so >>>>> that the headers I normally see (From:, To: and Subject:) include >>>>> something that indicates where the message is from. >>>> >>>> I would configure root to be an alias to root+machineID. >>>> >>> So how do I do that? >> >> Edit the .../postfix/aliases file and then run postalias on the file. >> > Ah, no, it never gets that far, I have:- > > luser_relay = m...@mydomain.co.uk > local_recipient_maps =
Hmm. Might have to edit the /etc/aliases and run newalaises then. But changing the name in /etc/password seems cleaner. > There are no local recipients, that's the whole point. These messages > will always be errors/warnings from daemons or cron processes on > (mostly) headless systems that I want to see so I'm sending them off > to myself. Right, but cron and daemon emails do not need or use a postfix install by default, so the question would be does the sendmail process or ssmtp read the /etc/alaises? I THINK it does, but it's been a long time since I needed to do this. I do have one server that still does this, but it is currently offline until I drive to the server room and push some buttons, so I can't double check exactly how it is configured, but this is what an exchange looks like from that server: [<-] 220 mail.covisp.net ESMTP Postfix 3.5.8 [->] EHLO mail.covisp.net:465 [<-] 250 CHUNKING [->] AUTH LOGIN [<-] 334 STUFF [->] STUFF [<-] 334 STUFF [<-] 235 2.7.0 Authentication successful [->] MAIL FROM:<r...@nmachineid.covisp.net> [<-] 250 2.1.0 Ok [->] RCPT TO:<root+machin...@covisp.net> [<-] 250 2.1.5 Ok [->] DATA [<-] 354 End data with <CR><LF>.<CR><LF> [->] Received: by mail.covisp.net:465 (sSMTP sendmail emulation); Sun, 29 Nov 2020 02:02:00 -0700 (But that's not postfix, but the very basic sSMTP, which works fine since that server only generates a few cron/deamon messages per week) -- Stupid men are often capable of things the clever would not dare to contemplate... --Feet of Clay