[dovecot-cvs] dovecot/doc variables.txt,1.4,1.5

cras at dovecot.org cras at dovecot.org
Sun Sep 11 23:25:07 EEST 2005


Update of /var/lib/cvs/dovecot/doc
In directory talvi:/tmp/cvs-serv27434/doc

Modified Files:
	variables.txt 
Log Message:
Added %R and %H documentation



Index: variables.txt
===================================================================
RCS file: /var/lib/cvs/dovecot/doc/variables.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- variables.txt	5 Jun 2005 21:40:56 -0000	1.4
+++ variables.txt	11 Sep 2005 20:25:04 -0000	1.5
@@ -21,6 +21,13 @@
  %L - lowercase
  %U - uppercase
  %E - escape '"', "'" and '\' characters by inserting '\' before them.
+ %R - reverse the string
+ %H - take a 32bit hash of the variable and return it as hex. You can also
+      limit the hash value. For example %256Hu gives values 0..ff. You might
+      want padding also, so %2.256Hu gives 00..ff. This can be useful for
+      example in dividing users automatically to multiple partitions. Note
+      that if you're hashing usernames being in user at domain form, you probably
+      want to reverse the string to get better hash value variety, eg. %3RHu.
 
 You can take a substring of the variable by giving optional offset followed
 by '.' and width after the '%' character. For example %2u gives first two



More information about the dovecot-cvs mailing list