[ALUG] Managing cron and similar E-Mails from headless systems
cl at isbd.net
Fri Feb 17 12:35:41 GMT 2017
On Fri, Feb 17, 2017 at 12:06:51PM +0000, Jonathan McDowell wrote:
> On Fri, Feb 17, 2017 at 11:58:34AM +0000, Chris Green wrote:
> > On Fri, Feb 17, 2017 at 11:10:33AM +0000, Laurie Brown wrote:
> > > On 17/02/17 10:33, Chris Green wrote:
> > > > It's (moderately) easy to set up an MTA and /etc/aliases so that the
> > > > messages are sent to my normal E-Mail. However I can't come up with a
> > > > straightforward way of indicating where the messsage is *from*.
> > > >
> > > > You can't just invent a domain name for the headless system because
> > > > that gets the E-Mail rejected by intermediate systems that try and
> > > > look up the sender host name. Cron doesn't seem to have any mechanism
> > > > for setting the sender's name, cron errors just come from 'root@'.
> > > >
> > > > Can anyone suggest a neat way of handling this so that I know where
> > > > the errors are coming from?
> > >
> > > Use SSMTP and set up the config file properly...
> > >
> > I looked at SSMTP but it doesn't seem to be maintained and I can't see
> > how to set the sender name either.
> > As I said above setting the domain doesn't help because the domain
> > used has to be a real domain which intermediate mail servers can look
> > up to check. So I can't just set the domain to rpi.isbd.co.uk because
> > there isn't any such domain.
> > If one could set a default From: line like:-
> > From: Rasberry Pi <root at isbd.co.uk>
> > that would do the necessary but I can't see how to do it.
> Exim on Debian uses /etc/email-addresses to determine how to expand
> local address for outgoing mail. Perhaps that might help?
Thank you! :-)
That took me to *exactly* what I need, postfix has a similar parameter
(and I'm much more familiar with Postfix):-
smtp_generic_maps (default: empty)
Optional lookup tables that perform address rewriting in the
Postfix SMTP client, typically to transform a locally valid
address into a globally valid address when sending mail across the
Internet. This is needed when the local machine does not have its
own Internet domain name, but uses something like
That description just about encapsulates my problem! ... and provides
a solution, I can set the 'From: ' address using this mechanism, I
More information about the main