From owner-freebsd-questions@FreeBSD.ORG Fri Dec 7 23:47:27 2007 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 2B6CF16A420 for ; Fri, 7 Dec 2007 23:47:27 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (dsl092-078-145.bos1.dsl.speakeasy.net [66.92.78.145]) by mx1.freebsd.org (Postfix) with ESMTP id E820E13C458 for ; Fri, 7 Dec 2007 23:47:26 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from Lowell-Desk.lan (Lowell-Desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id 16DC828430; Fri, 7 Dec 2007 18:47:23 -0500 (EST) Received: by Lowell-Desk.lan (Postfix, from userid 1147) id E17771CC35; Fri, 7 Dec 2007 18:47:22 -0500 (EST) To: Clint Olsen References: <20071207182353.GA90102@0lsen.net> <44tzmucofe.fsf@be-well.ilk.org> <20071207192006.GB90102@0lsen.net> From: Lowell Gilbert Date: Fri, 07 Dec 2007 18:47:22 -0500 In-Reply-To: <20071207192006.GB90102@0lsen.net> (Clint Olsen's message of "Fri\, 7 Dec 2007 11\:20\:06 -0800") Message-ID: <44sl2eqd85.fsf@Lowell-Desk.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: questions@freebsd.org Subject: Re: Hopefully an easy header rewriting problem for Postfix X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 23:47:27 -0000 Clint Olsen writes: > On Dec 07, Lowell Gilbert wrote: >> The "myorigin" variable is what you need. See postconf(5) for more >> things you can do with it. >> >> (> myorigin (default: $myhostname) >> (> The domain name that locally-posted mail appears to come from, and that >> (> locally posted mail is delivered to. The default, $myhostname, is ade- >> (> quate for small sites. If you run a domain with multiple machines, you >> (> should (1) change this to $mydomain and (2) set up a domain-wide alias >> (> database that aliases each user to user@that.users.mailhost. >> (> >> (> Example: >> (> >> (> myorigin = $mydomain > > Right, I have this set, yet it is still possible to have me send a mail > using Mutt with my From: address set as "host.my.domain". This works great > for incompletely specified recipients and senders etc. But I haven't > figured out how to incorporate myorigin to rewrite all addresses that match > a pattern to modify that (and only that) in the address. Ah; sorry I misunderstood your aim. I don't like doing this heavy-handed sort of rewriting, but the magic keyword is "masquerade". masquerade_classes, masquerade_domains, and masquerade_exceptions give you a number of options. I don't see any way to be quite as sweeping as you're describing, but in my opinion that's a good thing.