[Dovecot] order of variable modifiers

Timo Sirainen tss at iki.fi
Tue May 25 20:57:41 EEST 2010


On Fri, 2010-04-23 at 09:37 -0400, Phil Howard wrote:
> I'd like to have a variable substitute take the domain name part, lower case
> it, MD5 it, and take a 2-character substring of that.  Would that be like
> %2MLd ?

It's left to right, so "%2LMd". The substring is a special case, it's
always done to the finalized string.

> The documentation on the H hash modifier described reversing with
> R, but expresses it at %3RHu which seems to me like it would be reversing
> the hash result rather than the user string.

Maybe the text is a bit confusing. It does first reverse the string and
then take a hash of it. I guess the main problem here is that the %H
hash function is pretty bad, and doesn't give as good output values if
the end of the string is always the same.




More information about the dovecot mailing list