From owner-freebsd-questions@FreeBSD.ORG Mon Aug 3 12:58:04 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBD4C106566C for ; Mon, 3 Aug 2009 12:58:04 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 77C378FC1A for ; Mon, 3 Aug 2009 12:58:04 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 1E04DEB53B9; Mon, 3 Aug 2009 15:58:03 +0300 (EEST) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id F29394509B; Mon, 3 Aug 2009 15:58:02 +0300 (EEST) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qu8lAZgfcoSn; Mon, 3 Aug 2009 15:58:02 +0300 (EEST) Received: from kobe.laptop (adsl48-68.kln.forthnet.gr [77.49.175.68]) by mail.ceid.upatras.gr (Postfix) with ESMTP id BF0F845088; Mon, 3 Aug 2009 15:58:02 +0300 (EEST) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n73Cw1bq040821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Aug 2009 15:58:02 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n73Cw032040820; Mon, 3 Aug 2009 15:58:00 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: fbsd@dannysplace.net References: <4A763BDD.2010308@dannysplace.net> Date: Mon, 03 Aug 2009 15:58:00 +0300 In-Reply-To: <4A763BDD.2010308@dannysplace.net> (Danny Carroll's message of "Mon, 03 Aug 2009 11:22:37 +1000") Message-ID: <87prbddpgn.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: Sendmail Masqurading and root mails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 12:58:05 -0000 On Mon, 03 Aug 2009 11:22:37 +1000, Danny Carroll wrote: > I've added the following to the default sendmail mc file: > > MASQUERADE_AS(`mypublicdomain.com')dnl > FEATURE(masquerade_envelope)dnl > MASQUERADE_DOMAIN(beasie.lan)dnl > > Recompiled the cf files and restarted sendmail. > > Here is the kicker. If I log in as a normal user it masquerades just > fine. > > If I simply "su -" to root, the masquerading works fine and the mail is > sent as the original logged in user. > > But if I log in as root via the console then it does not alter the messages. The `root' user is excluded from masquerading since 8.10. The `generic.m4' domain configuration file includes: keramida@kobe:/usr/share/sendmail/cf/domain$ fgrep EXPOSE generic.m4 EXPOSED_USER(`root') keramida@kobe:/usr/share/sendmail/cf/domain$ You can copy this file and remove the EXPOSED_USER line. Or you can edit `generic.m4' directly. If you go the copy route, make sure to check for updates in `generic.m4' whenever you installworld, and merge the changes to your domain specific configuration file.