[Dovecot] OT dovecot w/postfix, mysql , postfix does unnecessary lookups

Noel Butler noel.butler at ausics.net
Fri Jul 30 14:50:02 EEST 2010


I know this unnecessary lookups question is really a postfix one, but
I'm curious if anyone else sees the behaviour of
postfix continuing looking up users after it clearly have got its answer
that it is  "not a local domain" response.


(this msg is an extract from what I sent to WV some time ago, with him
showing absolutely no interest, I got bored tonight so thought I'd throw
it on this list since the question remains valid today)

     30 Query       SELECT 1 FROM virtual_domains WHERE
name='example.net' AND active ='1'
     31 Query       SELECT destination FROM view_aliases WHERE
email='someuser at example.net'


Should that not have ended its lookups at Q30 and not gone on to ask Q31
which it now knows is not local?


Secondly,  it seems to do "double lookups" of destination and email
before it gets to dovecots deliver, has anyone else ran a log on mysql
and seen same? I'm trying to work out why, since it already has its
answer by Q54 and Q55, it is doing Q56 and Q57, which seem pointless...

     54 Connect    
     54 Query       SELECT destination FROM view_aliases WHERE
email='laura at example.com'
     55 Connect     
     55 Query       SELECT email FROM view_users WHERE
email='laura at example.com'
     
     56 Connect     
     56 Query       SELECT destination FROM view_aliases WHERE
email='laura at example.com'
     57 Connect     
     57 Query       SELECT email FROM view_users WHERE
email='laura at example.com'


So, it to me appears postifx does more work then it needs too since it
already knows the answer, I consider this a flaw in postfix, yet perhaps
I am the only one seeing it hence why WV couldnt give a shit.

just curious if anyone has noted same or not....



More information about the dovecot mailing list