>>>>> "Noel" == Noel Jones <njo...@megan.vbhcs.org> writes:

Noel> On 4/6/2016 8:06 AM, John Stoffel wrote:
>> Can I force the fallback_transport to re-write, before using the
>> fallback, john.t...@foo.bar.com into john.t...@hdqmta.foo.bar.com?
>> Since I think that's the problem?


Noel> Perhaps this is what you're missing:
Noel> http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
Noel> http://www.postfix.org/postconf.5.html#smtp_generic_maps

Noel> smtp_generic_maps can be used on a specific master.cf transport to
Noel> control rewriting to a specific destination.

Noel> # transport_maps
Noel> hdqmta.example.com  hdqmta

Noel> # generic_htqmta
Noel> @example.com  @hdqmta.example.com

Noel> # master.cf
Noel> # copy of standard smtp transport
Noel> hdqmta  unix  -   -   n   -   -   smtp
Noel>   -o smtp_generic_maps=hash:/etc/postfix/generic_htqmta


Thanks for the hints!  So I'm wondering if I need to do this for all
of my hosts?  But let me go back and expand on how things work, just
so we're on the same page and because I want to make sure I'm thinking
this through properly as well.

1. mail arrives, from anyway basically.
2. alias lookups happen, for example:  john.t...@foo.bar.com
   - no alias match, punt to hdqmta

   - alias match, say it goes to john.t...@exmail1.foo.bar.com
     - would I then have a generic_exmail1 file with just:

           @foo.bar.com @exmail1.foo.bar.com

       as well?

3. mail gets delivered properly...

Is this because I'm not using the local delivery agent, which knows
about NIS aliases, and also to then forward emails on to the new
envelope address?   And since I'm not using local delivery, I need to
be more explicit in my setup and handling?

Thanks,
John

Reply via email to