On Thu, 2009-07-23 at 18:47 +1000, Barney Desmond wrote:
>                              From: 
> Barney Desmond
> <barneydesm...@gmail.com>
>                                To: 
> postfix users list
> <postfix-users@postfix.org>
>                           Subject: 
> Re: Many SQL Lookups on outbounding
> mails
>                              Date: 
> Thu, 23 Jul 2009 18:47:54 +1000
> (09:47 BST)
> 
> 
> 2009/7/23 Clunk Werclick <clunk.wercl...@wibblywobblyteapot.co.uk>:
> > That is a comfort to know. My main concern was this hammering was
> not
> > optimal, but it is welcome to make as many queries as it likes if it
> > does not crash the database server. Perhaps Postgresql would be a
> bit
> > more manly ? but slower ?
> 
> Realistically you shouldn't notice a difference, but every system will
> be different, and between those two it'll depend somewhat on tuning as
> well.
> 
> > to disable parent domain searching'. I would like to do this and see
> if
> > it makes a difference. What do I need to take out/add to do this ?
> 
> You can do this in main.cf, I believe you just set an empty value.
> http://www.postfix.org/postconf.5.html#parent_domain_matches_subdomains
> 
> Something like:
> 
> parent_domain_matches_subdomains =
OK, done and reload but I'm still finding this (see below). What is
weird is the lookups it does based on the mail_from command. It's
recursing those in the database for a reason I am not sure I fully
understand? I understand why it do this for rcpt_to, makes full sense to
me, but for the sender also?
> 
> 
> Anecdotally, hash-based tables are "very fast". CDB tables are said to
> perform well at least up to a million entries.
> http://www.postfix.org/DATABASE_README.html#types
That scales well and I will re-engineer what I am doing to take
advantage of that. There seems little useful point to use SQL for
anything other than as a holding container that is used to generate maps
if these figures are correct. {in my context at least}
> 
{trim} 
> a little while ago, but the outcome was that the potential performance
> gain of not using proxymap when it's not needed was low, so you might
> as well always use it.
This is in my to be doing list and I thank you Sir.

After making single change suggestted and reload
A single test message by telnet where;

mail from: user...@yahoo.co.uk
rcpt to: t...@destination.co.uk

generated a lot of lookups for the 'mail from' command ?
803 Connect     postfi...@localhost on mndb
803 Query       SELECT transport FROM transport WHERE destination='*'
803 Query       SELECT transport FROM transport WHERE destination='*'

804 Connect     postfi...@localhost on mndb
804 Query       SELECT virtual_user_email FROM recipients WHERE
alias='yahoo.co.uk'
805 Connect     postfi...@localhost on mndb
805 Query       SELECT domain FROM domains WHERE domain='yahoo.co.uk'
AND local=1
806 Connect     postfi...@localhost on mndb
806 Query       SELECT domain FROM domains WHERE domain='yahoo.co.uk'
AND local=0
806 Query       SELECT domain FROM domains WHERE domain='.co.uk' AND
local=0
806 Query       SELECT domain FROM domains WHERE domain='.uk' AND
local=0
803 Query       SELECT transport FROM transport WHERE
destination='user...@yahoo.co.uk'
803 Query       SELECT transport FROM transport WHERE
destination='yahoo.co.uk'
803 Query       SELECT transport FROM transport WHERE
destination='.co.uk'
803 Query       SELECT transport FROM transport WHERE destination='.uk'

090723 10:18:07     804 Query       SELECT virtual_user_email FROM
recipients WHERE alias='destination.co.uk'
805 Query       SELECT domain FROM domains WHERE
domain='destination.co.uk' AND local=1
806 Query       SELECT domain FROM domains WHERE
domain='destination.co.uk' AND local=0
803 Query       SELECT transport FROM transport WHERE
destination='t...@destination.co.uk'
803 Query       SELECT transport FROM transport WHERE
destination='destination.co.uk'

807 Connect     postfi...@localhost on mndb
807 Query       SELECT virtual_user_email FROM recipients WHERE
alias='t...@destination.co.uk'
807 Query       SELECT virtual_user_email FROM recipients WHERE
alias='@destination.co.uk'

808 Connect     postfi...@localhost on mndb
808 Query       SELECT virtual_user_email FROM recipients WHERE
alias='t...@destination.co.uk'
808 Query       SELECT virtual_user_email FROM recipients WHERE
alias='@destination.co.uk'
808 Query       SELECT virtual_user_email FROM recipients WHERE
alias='postmas...@destination.co.uk'
808 Query       SELECT virtual_user_email FROM recipients WHERE
alias='@destination.co.uk'
090723 10:18:21     804 Query       SELECT virtual_user_email FROM
recipients WHERE alias='destination.co.uk'
805 Query       SELECT domain FROM domains WHERE
domain='destination.co.uk' AND local=1
806 Query       SELECT domain FROM domains WHERE
domain='destination.co.uk' AND local=0
803 Query       SELECT transport FROM transport WHERE
destination='postmas...@destination.co.uk'
803 Query       SELECT transport FROM transport WHERE
destination='destination.co.uk'

I switch to maps soon and this will not concern me, but I guess it will
still do this with maps and I wonder why ? I would like to get it to a 
'Lean mean e-mail machine' if I may -..- {}Long term hope when I learn
more things with Postfix{}

-- 
-----------------------------------------------------------
C Werclick .Lot
Technical incompetent
Loyal Order Of The Teapot.

This e-mail and its attachments is intended only to be used as an e-mail
and an attachment. Any use of it for other purposes other than as an
e-mail and an attachment will not be covered by any warranty that may or
may not form part of this e-mail and attachment. 



Reply via email to