question about sender_dependent_default_transport_maps syntax

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

question about sender_dependent_default_transport_maps syntax

Fabio Sangiovanni
Hi all,

from the docs of sender_dependent_default_transport_maps:
"Note: this overrides default_transport, not transport_maps, and
therefore the expected syntax is that of default_transport, not the
syntax of transport_maps. Specifically, this does not support the
transport_maps syntax for null transport, null nexthop, or null email
addresses."

And from the docs of default_transport:
"The :nexthop destination is optional; its syntax is documented in the
manual page of the corresponding delivery agent."

Is someone willing to clarify this a little? My question raises from the
fact that I used this configuration, and it worked:

main.cf:
     sender_dependent_default_transport_maps =
hash:/etc/postfix/sdd_transport_maps

# not-null transport, null nexthop
/etc/postfix/sdd_transport_maps:
     [hidden email]    mytransport:

/etc/postfix/master.cf:
     mytransport      unix  -       -       n       -       - smtp
             -o smtp_generic_maps=hash:/etc/postfix/generic

What am I missing here?

Thanks a lot

Fabio Sangiovanni
Reply | Threaded
Open this post in threaded view
|

Re: question about sender_dependent_default_transport_maps syntax

Wietse Venema
Fabio Sangiovanni:

> Hi all,
>
> from the docs of sender_dependent_default_transport_maps:
> "Note: this overrides default_transport, not transport_maps, and
> therefore the expected syntax is that of default_transport, not the
> syntax of transport_maps. Specifically, this does not support the
> transport_maps syntax for null transport, null nexthop, or null email
> addresses."
>
> And from the docs of default_transport:
> "The :nexthop destination is optional; its syntax is documented in the
> manual page of the corresponding delivery agent."
>
> Is someone willing to clarify this a little? My question raises from the
> fact that I used this configuration, and it worked:
>
> main.cf:
>      sender_dependent_default_transport_maps =
> hash:/etc/postfix/sdd_transport_maps
>
> # not-null transport, null nexthop
> /etc/postfix/sdd_transport_maps:
>      [hidden email]    mytransport:

You need to specify a nexthop destination only if you want to
override the default. The default nexthop destination is the domain
portion of the recipient address.

> /etc/postfix/master.cf:
>      mytransport      unix  -       -       n       -       - smtp
>              -o smtp_generic_maps=hash:/etc/postfix/generic
>
> What am I missing here?

It works but does not to match yesterday's requirements:

    I need to rewrite the address of some particular recipients,
    but just for messages with envelope sender different from the
    null sender. In other terms, I need to redirect messages for
    some recipients in a list (towards other, remote, addresses),
    but only if the envelope sender is not <>. In other terms, I
    need to redirect messages for some recipients in a list (towards
    other, remote, addresses), but only if the envelope sender is
    not <>. If the envelope sender is <>, I need messages to follow
    the standard route towards the internal host, even for the
    recipients on the list.

Before I proceed to write down a configuration that you don't need,
perhaps you can explain the *problem* that you are trying to solve,
instead of your solution to route <> envelopes differently.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: question about sender_dependent_default_transport_maps syntax

Fabio Sangiovanni
Wietse Venema <wietse <at> porcupine.org> writes:

>
> Fabio Sangiovanni:
> > Hi all,
> >
> > from the docs of sender_dependent_default_transport_maps:
> > "Note: this overrides default_transport, not transport_maps, and
> > therefore the expected syntax is that of default_transport, not the
> > syntax of transport_maps. Specifically, this does not support the
> > transport_maps syntax for null transport, null nexthop, or null email
> > addresses."
> >
> > And from the docs of default_transport:
> > "The :nexthop destination is optional; its syntax is documented in the
> > manual page of the corresponding delivery agent."
> >
> > Is someone willing to clarify this a little? My question raises from the
> > fact that I used this configuration, and it worked:
> >
> > main.cf:
> >      sender_dependent_default_transport_maps =
> > hash:/etc/postfix/sdd_transport_maps
> >
> > # not-null transport, null nexthop
> > /etc/postfix/sdd_transport_maps:
> >      mysender <at> domain.tld    mytransport:
>
> You need to specify a nexthop destination only if you want to
> override the default. The default nexthop destination is the domain
> portion of the recipient address.
>

I'm perfectly aware of this. To leave the nexthop destination at default
I need a null nexthop. This is against what the documentation says about
sender_dependent_default_transport_maps ("this does not support the
transport_maps syntax for null transport, null nexthop, or null email
addresses.").
What I'm pointing out here is a possible typo in the docs.

> > /etc/postfix/master.cf:
> >      mytransport      unix  -       -       n       -       - smtp
> >              -o smtp_generic_maps=hash:/etc/postfix/generic
> >
> > What am I missing here?
>

> It works but does not to match yesterday's requirements:
>
>     I need to rewrite the address of some particular recipients,
>     but just for messages with envelope sender different from the
>     null sender. In other terms, I need to redirect messages for
>     some recipients in a list (towards other, remote, addresses),
>     but only if the envelope sender is not <>. In other terms, I
>     need to redirect messages for some recipients in a list (towards
>     other, remote, addresses), but only if the envelope sender is
>     not <>. If the envelope sender is <>, I need messages to follow
>     the standard route towards the internal host, even for the
>     recipients on the list.
>
> Before I proceed to write down a configuration that you don't need,
> perhaps you can explain the *problem* that you are trying to solve,
> instead of your solution to route <> envelopes differently.

If I wanted further advice about yesterday's topic I would have answered
whithout changing the subject, as I did this morning.
But in this case, I don't. I just asked for clarifications about the docs.
And that's exactly the reason I started a new thread.
As far as I'm concerned, our agreement still stands, and I'd
appreciate if you could help with configuration about that matter, since
*those* requirements, as reported yesterday, haven't changed.

Fabio

Reply | Threaded
Open this post in threaded view
|

Re: question about sender_dependent_default_transport_maps syntaxu

Fabio Sangiovanni
In reply to this post by Fabio Sangiovanni
Fabio Sangiovanni <sangiovanni <at> nweb.it> writes:

> Is someone willing to clarify this a little?

Sorry if I quote myself, but what about this?
Is it to be considered an error in the docs?
I'm referring to the possibility to specify a
null nexthop in sender_dependent_default_transport_maps,
while the documentation states clearly that it's
not supported.

Thanks a lot

Fabio Sangiovanni


Reply | Threaded
Open this post in threaded view
|

Re: question about sender_dependent_default_transport_maps syntaxu

Wietse Venema
Fabio Sangiovanni:

> Fabio Sangiovanni <sangiovanni <at> nweb.it> writes:
>
> > Is someone willing to clarify this a little?
>
> Sorry if I quote myself, but what about this?
> Is it to be considered an error in the docs?
> I'm referring to the possibility to specify a
> null nexthop in sender_dependent_default_transport_maps,
> while the documentation states clearly that it's
> not supported.

sender_dependent_default_transport_maps supports different syntax
than transport_maps.  

Both support the form "name:" and "name" (both mean the same thing).
That's where the similarity ends.

In addition transport_maps supports the result ":" which is definitely
not valid with default_transport (and by implication also not valid
for sender_dependent_default_transport_maps).

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: question about sender_dependent_default_transport_maps syntaxu

Fabio Sangiovanni
Wietse Venema <wietse <at> porcupine.org> writes:

>
> Fabio Sangiovanni:
> sender_dependent_default_transport_maps supports different syntax
> than transport_maps.  
>
> Both support the form "name:" and "name" (both mean the same thing).
> That's where the similarity ends.
>
> In addition transport_maps supports the result ":" which is definitely
> not valid with default_transport (and by implication also not valid
> for sender_dependent_default_transport_maps).

And of course the same can be said for the ":nexthop" result, I suppose.

Thanks!