[Dovecot] Trim trailing whitespace from username
Timo Sirainen
tss at iki.fi
Fri May 16 12:10:56 EEST 2008
On Fri, 2008-05-16 at 00:48 -0700, David Jonas wrote:
> Recently we changed Postfix to use Dovecot for our SASL authentication
> and we ran into trouble with some of our clients having extraneous
> spaces at the end of their usernames. The quick fix was to add a space
> to username_chars. The slightly longer fix was a pretty simple patch to
> Dovecot. I put the trimming in auth_request_fix_username. I didn't think
> it warranted a full strfuncs function.
>
> If there is a better way to do this I'm all ears. I don't really like
> patching with my own code, even if I did essentially steal if from the
> kernel's strstrip().
How about this: http://hg.dovecot.org/dovecot-1.1/rev/15ddb7513e2d
Then you can use auth_username_format = %Tu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080516/a5780a66/attachment.bin
More information about the dovecot
mailing list