> Le 5 oct. 2015 à 15:12, Wietse Venema a écrit :
> 
> Axel Luttgens:
>>      smtpd_sender_login_maps =
>>              sqlite:db_sender_login_map
>>              hash:$config_directory/maps/sender_login_exceptions
>> 
>> No matter whatever I put in sender_login_exceptions, it was never taken into 
>> account.
> 
> Of course not. The tables are queried in the specified order. The
> result from the first table takes precedence over the second table.
> 
> Note that Postfix makes up to five queries:
> 
> - The full email address including local-part extension
> - The full email address without local-part extension
> - The local-part including local-part extension
> - The local-part without local-part extension
> - The recipient @domain
> 
> The first query is made through all tables, and if no result is found,
> the second query is made, and so on.

Hello Wietse,

Once again, many thanks for your reply.

As usual, I’ll probably appear quite dumb, but I’ll ask anyway. ;-)

Let’s say I have following data in the database (db_sender_login_map):

        from_address            login
        ============            =====
        jonh....@example.com    jdoe
        ed.mur...@example.com   emurphy

and this one in the hash (sender_login_exceptions):

        # from_address          login
        i...@example.com        emurphy

The idea being to allow authenticated user emurphy to send emails with 
enveloppe sender addresses "ed.mur...@example.com" (the usual case) or 
"i...@example.com" (an exception).

With:

        smtpd_sender_login_maps =
                sqlite:db_sender_login_map
                hash:$config_directory/maps/sender_login_exceptions

user emurphy may only send with address "ed.mur...@example.com".

With:

        smtpd_sender_login_maps =
                hash:$config_directory/maps/sender_login_exceptions
                sqlite:db_sender_login_map

user emurphy may send with either sender address "ed.mur...@example.com" or 
sender address "i...@example.com".

A bit as if a database-based query (or is it more specifically a sqlite-based 
one?) abruptly ended the lookup chain.

Am I just overlooking the obvious (looking too hard at the screen)?

Axel

Reply via email to