On 19.2.2013, at 13.48, Charles Marcus <[email protected]> wrote:

> On 2013-02-18 10:39 PM, Timo Sirainen <[email protected]> wrote:
>> On 18.2.2013, at 23.50, Michael Grimm <[email protected]> wrote:
>>> With "doveconf -H dovecot%9d" I do end in tons of reported collisions like 
>>> ...
>>> | doveconf: Error: Duplicate host hashes: dovecot1368344 and dovecot2055005
>>> | doveconf: Error: Duplicate host hashes: dovecot2042008 and dovecot2056918
>>> | doveconf: Error: Duplicate host hashes: dovecot1844965 and dovecot2058312
>> Sure there are going to be hash collisions at some point, but I highly doubt 
>> you're going to create a million server Dovecot cluster. :)
> 
> I've been following this thread with interest (or mostly out of curiosity, as 
> I will have no need for running multiple machines, except possibly to run one 
> secondary machine as a 'hot spare', but here I'm confused (and my ignorance 
> is apparently showing)...
> 
> How are any of the above 'collisions? The hashes are different.

Dovecot uses last 32 bits of SHA1 of the name. So collisions for example:

% printf "dovecot1368344"| sha1sum | awk '{print $1}' | cut -c 33-
bd593aec
% printf "dovecot2055005"| sha1sum | awk '{print $1}' | cut -c 33-
bd593aec

Reply via email to