On Thu, Apr 10, 2008 at 05:34:47PM +0300, [EMAIL PROTECTED] wrote: > ... I want users to be able > to continie to use full email addresses as POP3 logins, > popa3d to just ignore domains in logins and to use localpart as the username. > I wrote and tested a patch http://lena.kiev.ua/popa3d-1.0.2-nonvirtual.diff > It seems to work OK. I also include the same patch below.
Thank you for contributing the patch. I've placed it in here (with a link to this message added as a comment before the actual patch): ftp://ftp.openwall.com/pub/projects/popa3d/contrib/patches/ I think that this is a bit too much of a special case to link to the patch from the popa3d homepage, and the patch is trivial. > + strncpy(pop_user, user, at_offset); This is fine, but I'd use memcpy() here. strncpy() is almost never the right choice because of its weird semantics - NUL padding (which is slow), but no guaranteed NUL termination. Most of the time, when I write portable code, I use strncat() instead (not forgetting to set the first character of the target buffer to NUL and to subtract 1 from the buffer size). Thanks again, Alexander