Underscore in SERVICES-names can cause deadlocks.

Rudy Gevaert Rudy.Gevaert at UGent.be
Wed Mar 21 04:02:10 EDT 2012

On 03/20/2012 06:42 PM, Henrique de Moraes Holschuh wrote:
> On Tue, 20 Mar 2012, Robert Linden wrote:
>> The tricky part is, that not all names that look distinct really are treated
>> differently by cyrus. Notable example: "imap" and "imap_remote" result
>> in the same lockfile (/var/imapd/socket/imap-0.lock), because the name is
>> truncated at the '_'. The '_' doesn't seem to be illegal per se, because cyrus
>> does not complain and the service runs ok most of the time, i.e. as long as no
>> concurrent connections are created on the 2 interfaces to trigger the race-
>> condition.
>> Maybe other characters cause this problem as well, so if one is unsure about
>> this it would be best to just stick to alphanumeric characters.
> IMHO we really should refuse service names that will cause issues, which
> probably means we should enforce that services be named [a-z][a-z0-9]+
> to avoid potential pitfalls.
> This is the second report about the permissive acceptance of service
> names causing bad surprises...

I think _ isn't allowed (but it isn't detected) because in imapd.conf we 
use the _ to configure per service overrides.

I'm all for tightening up the allowed characters.

More information about the Cyrus-devel mailing list