sendmail, masquerading, exposed root?
Polytropon
freebsd at edvax.de
Mon May 28 16:08:13 UTC 2012
On Mon, 28 May 2012 12:49:43 +0100, Anton Shterenlikht wrote:
> If I leave the root exposed, the From
> field looks e.g. root at mech-anton240.men.bris.ac.uk,
> which is rejected by the university mailer,
> because it has no knowledge of this address.
You should be able to use sendmail's masquerading features.
For example to be configured in the correct .mc file:
FEATURE(always_add_domain)
FEATURE(`masquerade_entire_domain')
FEATURE(`masquerade_envelope')
FEATURE(`allmasquerade')
MASQUERADE_AS(`bris.ac.uk')
MASQUERADE_DOMAIN(`bris.ac.uk.')
MASQUERADE_DOMAIN(localhost)
MASQUERADE_DOMAIN(localhost.localdomain)
That should turn root at mech-anton240.men.bris.ac.uk into
root at bris.ac.uk if that's okay for you. If you change
root's name field in the passwd database (use chsh),
you could add a specific machine name so you'll easily
see from which root account you're receiving messages,
e. g.
From: mech-anton240.men root <root at bris.ac.uk>
To: You <where.you.wanna.get at your.root.mail.to>
Subject: mech-anton240.men.bris.ac.uk security run output
... and so on ...
That's no big problem as you're not going to reply to
that address. (If you had to, setting Reply-To: would
surely help.)
Or you could use /etc/mail/aliases to redirect root to
a different mail address.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list