> popbox, domain WHERE popbox.local_part = 'b' AND popbox.domain_name > 't@efbs.net' AND popbox.domain_name = domain.domain_name Here's the problem: tpop seems to split the login name at the dot instead of the @. Did you change the DOMAIN_SEPARATORS in util.h? They should only be "@$!:".