Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: Victor Sorry again, I meant Viktor.

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: Victor Duchovni wrote: If you want the fewest possible lookups against $mydestination, get $mydestination out of $relay_domains (backwards compatible, but no longer optimal default). relay_domains was and is empty (please see one of my last replies to mouss). Whil

Re: storing mydestination in mysql

2008-09-17 Thread mouss
rihad wrote: Victor Duchovni wrote: On Wed, Sep 17, 2008 at 10:09:53PM +0500, rihad wrote: Correcting myself once again: It's not OK :) I forgot to mention that all those 4 requests were the result of me issuing RCPT TO alone. I can't see how message acceptance or routing are involved. You

Re: storing mydestination in mysql

2008-09-17 Thread rihad
Victor Duchovni wrote: On Wed, Sep 17, 2008 at 10:09:53PM +0500, rihad wrote: Correcting myself once again: It's not OK :) I forgot to mention that all those 4 requests were the result of me issuing RCPT TO alone. I can't see how message acceptance or routing are involved. You are wasting ev

Re: storing mydestination in mysql

2008-09-17 Thread Victor Duchovni
On Wed, Sep 17, 2008 at 10:09:53PM +0500, rihad wrote: > Correcting myself once again: It's not OK :) I forgot to mention that > all those 4 requests were the result of me issuing RCPT TO alone. I > can't see how message acceptance or routing are involved. You are wasting everyone's time with t

Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: mouss wrote: Also set parent_domain_matches_subdomains = (empty) Then retry to see how many lookups there are. [snip] But it's different processes doing the queries (one to accept the message, one to route the message to the local delivery agent, ...). Oh, in that case it'

Re: storing mydestination in mysql

2008-09-17 Thread rihad
Victor Duchovni wrote: On Wed, Sep 17, 2008 at 08:51:48PM +0500, rihad wrote: Sure enough, but I'm speaking of a single snapshotted value through a single request ("transaction"). Besides its being more efficient, caching makes for more consistent results: you wouldn't want Postfix to first c

Re: storing mydestination in mysql

2008-09-17 Thread mouss
rihad wrote: mouss wrote: rihad wrote: rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambiguous in this re

Re: storing mydestination in mysql

2008-09-17 Thread Victor Duchovni
On Wed, Sep 17, 2008 at 08:51:48PM +0500, rihad wrote: > Sure enough, but I'm speaking of a single snapshotted value through a > single request ("transaction"). Besides its being more efficient, > caching makes for more consistent results: you wouldn't want Postfix to > first consider a deliver

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambiguous in this regard. Answer

Re: storing mydestination in mysql

2008-09-17 Thread mouss
rihad wrote: rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambiguous in this regard. Answering to myself:

Re: storing mydestination in mysql

2008-09-17 Thread Michael Tokarev
rihad wrote: [] allowed. I will replace $myhostname in MySQL with its expanded value once I get the query to happen at all... How about adding the following single line to your postfix startup script, before executing postfix's master: postconf -e myhostname=`mysql-query-for-postfix-hostname

Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambiguous in this regard. Answering to myself: OK, Postfix s

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: query = SELECT v FROM mydestination WHERE k='%s' - do not return NULL. since the result is unused, simply use query = SELECT 'blah' mydestination WHERE k='%s' Sorry, but your suggested fix doesn't solve the problem: the query still doesn't happen when I restar

Re: storing mydestination in mysql

2008-09-17 Thread mouss
rihad wrote: Correction: /usr/local/etc/postfix/main.cf: mydestination = mysql:/usr/local/etc/postfix/mysql-mydestination.conf /user/local/etc/postfix/mysql-mydestination.conf: host = localhost username = postfix password = none dbname = mail expansion_limit = 1 query = SELECT v FROM mydestina

Re: storing mydestination in mysql

2008-09-16 Thread rihad
Correction: /usr/local/etc/postfix/main.cf: mydestination = mysql:/usr/local/etc/postfix/mysql-mydestination.conf /user/local/etc/postfix/mysql-mydestination.conf: host = localhost username = postfix password = none dbname = mail expansion_limit = 1 query = SELECT v FROM mydestination WHERE k='

storing mydestination in mysql

2008-09-16 Thread rihad
Hi there, I'm a Postfix newb playing with Postfix-current under FreeBSD and am now trying to store mydestination in mysql: /usr/local/etc/postfix/main.cf: mydestination = mysql:/usr/local/etc/postfix/mysql-mydestination.conf /user/local/etc/postfix/mysql-mydestination.conf: host = localhost use