Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2008 14:55:27 +0100
From:      Jonathan Belson <jon@witchspace.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        glarkin@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re: Changing 'From:' address of periodic scripts
Message-ID:  <48B6AE4F.3050903@witchspace.com>
In-Reply-To: <48B671B4.9070602@infracaninophile.co.uk>
References:  <48A00C8C.4060105@witchspace.com> <48A05902.8060103@FreeBSD.org> <48B66D15.5080104@witchspace.com> <48B671B4.9070602@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Seaman wrote:
> Jonathan Belson wrote:
> | | OK, thanks.  After playing with MASQUERADE_AS(), MASQUERADE_DOMAIN() 
> | plus a few FEATURES(), I've managed to change the 'From:' address for 
> | e-mails sent via the command line.  Unfortunately, e-mails sent via 
> the | cron-ed periodic scripts still don't get through, although if I 
> run e.g. | 'periodic daily' from the command line, the mail does reach me.
> | | The only difference I can think of is that cron runs the scripts as 
> | root.  Could this cause the difference?
> 
> Yes.  root is specifically exempted from all the masquerading stuff.
> There's an EXPOSED_USER macro you can use in $(hostname).mc to control
> that.

Ah, that explains it.  There doesn't seem to be a way to remove exposed users, 
but there is a web page explaining how to stop 'root' being added as a default 
exposed user:

http://www.grok.org.uk/docs/smroot.html

Instead of doing this, I've told periodic.conf to send its output to my local 
account on the server, and added a .forward file to pass the e-mail to my 'real' 
address.  Hopefully this will play nicely with sendmail's masquerading.

Cheers,

--Jon




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48B6AE4F.3050903>