Which From: address does periodic use?

Hi all,

I have set up a server to send root email to an external Fastmail account, using ssmtp. Emails sent from the command line are sent fine. When periodic runs (or rather when I run 'periodic daily' from a root prompt) however, maillog gets an entry as follows:

Code:
Dec  4 16:13:45 myserver sSMTP[4156]: Creating SSL connection to host
Dec  4 16:13:46 myserver sSMTP[4156]: SSL connection using TLS_AES_256_GCM_SHA384
Dec  4 16:13:47 myserver sSMTP[4156]: 551 5.7.1 Not authorised to send from this header address

I've done some digging around, but it's not clear to me exactly which account periodic runs as when it executes on schedule, nor what it configures the From: field to contain. I'm wondering about this such that I can add an appropriate entry in /usr/local/etc/ssmtp/revaliases. I can't seem to find where ssmtp stores failed emails on file so I haven't had any success there.

Could anyone help me out with some info, or suggest another reason periodic's emails are not getting sent out?

Many thanks,

Ian
 
Thanks SirDice, however once I got this working I discovered a couple of layers of redirection below that.

The true source address used by periodic turned out to be 'mailnull', AKA 'Sendmail Default User', which a vanilla /etc/aliases redirects to 'postmaster' which redirects to 'root'. I guess the mail envelope gives away this detail, which is what tripped up ssmtp. Adding an entry for mailnull in /usr/local/etc/ssmtp/revaliases did the trick and now mails sent by periodic do successfully get routed out to my Fastmail account.
 
Back
Top