Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2012 18:08:11 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Anton Shterenlikht <mexas@bristol.ac.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sendmail, masquerading, exposed root?
Message-ID:  <20120528180811.03ce6351.freebsd@edvax.de>
In-Reply-To: <20120528114943.GA30701@mech-cluster241.men.bris.ac.uk>
References:  <20120528114943.GA30701@mech-cluster241.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@mech-anton240.men.bris.ac.uk into
root@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@bris.ac.uk>
	To: You <where.you.wanna.get@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120528180811.03ce6351.freebsd>