Masquerade the from field using sendmail
Brian Somers
brian at Awfulhak.org
Tue May 21 16:12:21 BST 2002
> On Tue, May 21, 2002 at 03:15:27PM +0100, Mervyn Passmore wrote:
> > I have a 4.5 BSD server that does our transactions, like invoices etc. I
> > would like it to email our customers as the order status changes. I want the
> > message to appear to come from our sales dept, but sendmail uses the
> > server's login and server name. I can alter the 'Reply to', but not the
> > 'From' by sendmail options.
> >
> > I read that masqerade_as can be set in my sendmail config file, and tried to
> > follow the instructions. My cf directory is empty, so cannot modify and make
> > the .mc file.
> >
> > Does anyone know how to go about this? Which .mc file should I modify? Or
> > can I just modify the sendmail.cf file?
>
> Have a look at freebsd.mc in /etc/mail. You'll probably need to add the
> lines:
>
> MASQUERADE_AS(`mydomain.com')
> FEATURE(`masquerade_envelope')
>
> In fact, you're probably best off copying freebsd.mc to $HOSTNAME.mc and
> changing that instead.
>
> When you've done your changes, cd into /etc/mail and run 'make'.
>
> You're probably best off reading the Makefile and README in /etc/mail, as
> I've never used this. :-)
Adding
SENDMAIL_MC= /etc/mail/$HOSTNAME.mc
to /etc/make.conf will ensure that this is built into sendmail.cf at
buildworld time.
> -Dom
--
Brian <brian at Awfulhak.org> <brian at freebsd-services.com>
<http://www.Awfulhak.org> <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org>
More information about the Ukfreebsd
mailing list