From owner-freebsd-questions@FreeBSD.ORG Mon Aug 3 04:29:23 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 D83FE106566B for ; Mon, 3 Aug 2009 04:29:23 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id AF4D58FC16 for ; Mon, 3 Aug 2009 04:29:23 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 23A553B04FB; Mon, 3 Aug 2009 00:29:23 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 03 Aug 2009 00:29:23 -0400 X-Sasl-enc: ufWE5TcQ7DiShz2TUO4+bqgVhtISTg9ezv3/SR96zEpj 1249273746 Received: from hagrid.ewd.goldmark.org (n114.ewd.goldmark.org [72.64.118.114]) by mail.messagingengine.com (Postfix) with ESMTPSA id D0D3E10DA8; Mon, 3 Aug 2009 00:29:06 -0400 (EDT) Message-Id: From: Jeffrey Goldberg To: fbsd@dannysplace.net In-Reply-To: <4A763BDD.2010308@dannysplace.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sun, 2 Aug 2009 23:29:21 -0500 References: <4A763BDD.2010308@dannysplace.net> X-Mailer: Apple Mail (2.935.3) 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 04:29:24 -0000 On Aug 2, 2009, at 8:22 PM, Danny Carroll wrote: > 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. I found the answer to your problem here: http://www.grok.org.uk/docs/smroot.html The file that is being included which has the EXPOSED_USER(`root') line lives at /usr/share/sendmail/cf/domain/generic.m4 Just make a copy of that file, call it beasie.m4, remove the "EXPOSE_USER" directive from your copy and then change DOMAIN(generic) to DOMAIN(beasie) in your mail .mc file. Cheers, -j -- Jeffrey Goldberg http://www.goldmark.org/jeff/