Size of array hosts, vhosts_count and modulo operation

rub zorghy gdrub13 at gmail.com
Fri Dec 5 19:04:38 UTC 2014


Hi,

Timo Sirainen wrote (May 19, 2010 1:50:34 am) :

"When a connection from a newly seen user arrives, it gets assigned to a
mail server according to a function:

host = vhosts[ md5(username) mod vhosts_count ]"

This hash function is it still used as it is without modification ?

My another question sounds pretty innocent but I have doubts about
vhosts_count.

Taking two directors with three backend Dovecot as an example, the number
of (v)hosts assigned for each host is "100" (default value of the
vhost_count variable).

I gather that the value for vhosts_count (to perform the modulo operation)
and the size or length of the array (vhosts[]) in terms of number of
elements are equal to 300.

Thx so much.

gdrub


More information about the dovecot mailing list