[Dovecot] Dovecot 2.0 with LMTP
Hello,
I'm testing Dovecot 2.0.
I plan to use Dovecot 2.0 with thousands of domains per server. My user base is under virtual MySQL.
Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.
Best Regards
[]'s Thiago Henrique Network Administration Digirati Networks K8 Networks
On 8.7.2010, at 1.02, Thiago Henrique wrote:
Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.
It depends on your configuration.
a) Is the MySQL query needed at all? If everyone uses the same uid/gid and the home directory can be set up with a template, you could use userdb static and avoid the query for everyone. This assumes that your MTA already verified that the address is valid, otherwise it could start creating "new users".
b) If a) doesn't work, you can set auth_cache_size so Dovecot will cache recent lookups.
c) You can create a local replica of your SQL userdb, either again to MySQL or even a flat file or something..
On 2010-07-07 8:16 PM, Timo Sirainen wrote:
On 8.7.2010, at 1.02, Thiago Henrique wrote:
Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.
b) If a) doesn't work, you can set auth_cache_size so Dovecot will cache recent lookups.
What SMTP server do you use? Postfix has excellent support for address caching, including positive/negative cache settings that can be tuned for just such purposes:
http://www.postfix.org/postconf.5.html#address_verify_map
--
Best regards,
Charles
Charles Marcus wrote:
On 2010-07-07 8:16 PM, Timo Sirainen wrote:
On 8.7.2010, at 1.02, Thiago Henrique wrote:
Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.
b) If a) doesn't work, you can set auth_cache_size so Dovecot will cache recent lookups.
What SMTP server do you use? Postfix has excellent support for address caching, including positive/negative cache settings that can be tuned for just such purposes:
Exim also has excellent caching for recipient address verification.
Bill
On 2010-07-08 12:11, William Blunn wrote:
Exim also has excellent caching for recipient address verification.
Off topic for Dovecot, but probably relevant for this thread: Not as excellent as you might think. Exim will typically do at least 2 "userdb"-type lookups for each recipient of a message. One when verifying the recipient and another when delivering the message. The reason for this is that the delivery in done in a separate process.
Not that Exim isn't an excellent product; I couldn't imaging living without it :-)
Bob
Thiago Henrique wrote:
I'm testing Dovecot 2.0.
I plan to use Dovecot 2.0 with thousands of domains per server. My user base is under virtual MySQL.
Is there a way to make the LMTP not make query to MySQL for each message delivered ? I'm afraid that the MySQL server does not support the load.
A "SELECT" query retrieving a single record on a MySQL database should be a cheap operation.
How long are your queries taking?
Your common queries should work principally by index scans.
Your indexes should be entirely in RAM.
So queries which retrieve a single row from a table should run in O(log N) time, which in my experience is usually measured in milliseconds.
Bill
participants (5)
-
B. Johannessen
-
Charles Marcus
-
Thiago Henrique
-
Timo Sirainen
-
William Blunn