Hopefully an easy header rewriting problem for Postfix

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Fri Dec 7 11:09:11 PST 2007


Clint Olsen <clint.olsen at gmail.com> writes:

> I essentially want to rewrite all envelope senders of the form:
>
> @host.my.domain
>
> to just
>
> @my.domain
>
> The examples in the Postfix docs seem to make it seem like the patterns
> only allow you to specify explicit recipients at the end of a rewriting
> rule, but that's not what I want.  I know this was a common thing to do in
> Sendmail using that hideous CF syntax.
>
> Any cluepons would be very much appreciated.

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 at that.users.mailhost.
(>
(>       Example:
(>
(>       myorigin = $mydomain



More information about the freebsd-questions mailing list