transport_maps and lookups reason

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

transport_maps and lookups reason

Bokhan Artem
Hello.

I have 'transport_maps = mysql:/etc/postfix/transport.cf' in
configuration and want to understand the reason of every db lookup as I
have some actions in mysql server based on queries count. Please explain
them.

When sending single email these lookups are made:

1. "*"
2. "source@emal"
3. "destination@email"
4. "destination@email"

Especially what directives cause lookups over "mail from" address and
why destination address is called twice?

I have single mysql inclusion in configuration.

postfix 3.3.0

Thanks.


Reply | Threaded
Open this post in threaded view
|

Re: transport_maps and lookups reason

Wietse Venema
Bokhan Artem:

> Hello.
>
> I have 'transport_maps = mysql:/etc/postfix/transport.cf' in
> configuration and want to understand the reason of every db lookup as I
> have some actions in mysql server based on queries count. Please explain
> them.
>
> When sending single email these lookups are made:
>
> 1. "*"
> 2. "source@emal"
> 3. "destination@email"
> 4. "destination@email"
>
> Especially what directives cause lookups over "mail from" address and
> why destination address is called twice?
>
> I have single mysql inclusion in configuration.
>
> postfix 3.3.0

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html

Thank you for using Postfix.
Reply | Threaded
Open this post in threaded view
|

Re: transport_maps and lookups reason

Viktor Dukhovni
In reply to this post by Bokhan Artem


> On May 15, 2018, at 8:01 AM, Bokhan Artem <[hidden email]> wrote:
>
> When sending single email these lookups are made:
>
> 1. "*"

This is typically cached, and not queried for each and every message.

> 2. "source@emal"
> 3. "destination@email"
> 4. "destination@email"
>
> Especially what directives cause lookups over "mail from" address and why destination address is called twice?

Postfix performs the lookups it needs to perform.  We document
the configuration interface.  The exact timing and multiplicity
of the underlying lookups is an internal detail.  Postfix is
modular and some lookups are made in more than once in separate
processes.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: transport_maps and lookups reason

Bokhan Artem
Thank you.

> 2. "source@emal"

Can source email (mail from) lookup be disabled when using
transport_maps? Any ideas? As I understand transport_maps should rely on
destination address when sender depended transport maps are not used.


15.05.2018 20:48, Viktor Dukhovni пишет:

>> 2. "source@emal"
>> 3. "destination@email"
>> 4. "destination@email"
>>
>> Especially what directives cause lookups over "mail from" address and why destination address is called twice?
> Postfix performs the lookups it needs to perform.  We document
> the configuration interface.  The exact timing and multiplicity
> of the underlying lookups is an internal detail.  Postfix is
> modular and some lookups are made in more than once in separate
> processes.
>

Reply | Threaded
Open this post in threaded view
|

Re: transport_maps and lookups reason

Viktor Dukhovni


> On May 15, 2018, at 10:00 AM, Bokhan Artem <[hidden email]> wrote:
>
> Can source email (mail from) lookup be disabled when using transport_maps? Any ideas? As I understand transport_maps should rely on destination address when sender depended transport maps are not used.

As Wietse suggested, it would be prudent to post your configuration.

If you have any "check_sender_access" restrictions, those will trigger
a transport lookup on the sender, since transport lookup actually
resolves a resipient to (transport, nexthop, address) with the address
suitably normalized.

--
        Viktor.