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

Noel> On 4/6/2016 10:11 AM, John Stoffel wrote:
>>>>>>> "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?

Noel> Yes, if this is a different server that expects the address to be
Noel> @exmail1...


>> 
>> 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?

Noel> This is just to rewrite an address from one form to another during
Noel> smtp delivery.


Ok, so I think I did what you said I should but it's not working.
Probably because I did NOT setup:

   smtp_generic_maps = hash:/etc/postfix/generic

because it's not really clear what I need there, since do my lookups
via NIS aliases, and thne forward to the location specified.

So right now what happens is:

   mail -> mailhost-new (postfix) -> hdqmta -> mailhost (orig) -> hdqmta
        -> back to me via Lotus notes forward.

See how it's going a double loop, where the old mailhost is re-writing
the envelope properly.  According to the headers, postfix is doing the
masquerading.  I've setup my /etc/postfix transport_maps like this:

    #
    # Added to make lotus notes and exchange happy
    #
    hdqmta.foo.bar.com  hdqmta
    exmail1.foo.bar.com exmail1


But it's not working.  I've setup stuff like you suggested in master.cf:

    #
    # TAEC
    #
    hdqmta    unix  -       -       n       -       -       smtp
            -o smtp_generic_maps=hash:/etc/postfix/generic_hdqmta
    exmail1   unix  -       -       n       -       -       smtp
            -o smtp_generic_maps=hash:/etc/postfix/generic_exmail1

But I do NOT have the smtp_generic_maps setup at all, because I need
to re-write @foo.bar.com to @hdqmta.foo.bar.com or
@exmail1.foo.bar.com depending on transport.  Gah!!!

Sorry if I'm being dense here, I know I'm trying to do something
that's not quite the normal thing here.

Would it be smarter for me to split up things into multiple relay
servers instead?  Dunno...

John



Reply via email to