From owner-freebsd-questions@FreeBSD.ORG Mon May 28 16:08:13 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8728D1065676 for ; Mon, 28 May 2012 16:08:13 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 4702B8FC1C for ; Mon, 28 May 2012 16:08:12 +0000 (UTC) Received: from r56.edvax.de (port-92-195-20-192.dynamic.qsc.de [92.195.20.192]) by mx01.qsc.de (Postfix) with ESMTP id 4853B3C995; Mon, 28 May 2012 18:08:12 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q4SG8BHB002049; Mon, 28 May 2012 18:08:11 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 28 May 2012 18:08:11 +0200 From: Polytropon To: Anton Shterenlikht 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> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: sendmail, masquerading, exposed root? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 16:08:13 -0000 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 To: You 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, ...