variables.txt revision 596d8be0eb9b69b26c9d89a77f7e52d381c4b333
c25356d5978632df6203437e1953bcb29e0c736fTimo SirainenYou can use special variables in several places:
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen - default_mail_env setting
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen - namespace locations
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen - static userdb template string
d9fdacd5fb3e07997e5c389739d2054f0c8441d8Timo Sirainen - LDAP and SQL userdb query strings
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen - log prefix for imap/pop3 process
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo SirainenThe variables are:
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
5fb3bff645380804c9db2510940c41db6b8fdb01Timo Sirainen %u - username
5fb3bff645380804c9db2510940c41db6b8fdb01Timo Sirainen %n - user part in user@domain, same as %u if there's no domain
15b9759df8e4f6fb00c115353827a2aebbebfebcTimo Sirainen %d - domain part in user@domain, empty if user there's no domain
15b9759df8e4f6fb00c115353827a2aebbebfebcTimo Sirainen %h - home directory
d7a56951e519c28ac9b1fd5810a455a9ba238327Timo Sirainen %s - service (IMAP or POP3)
d7a56951e519c28ac9b1fd5810a455a9ba238327Timo Sirainen %p - PID of the current process (login or imap/pop3 process)
15b9759df8e4f6fb00c115353827a2aebbebfebcTimo Sirainen %l - local IP address
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen %r - remote IP address
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo SirainenYou can apply a modifiers for each variable (eg. %Lp = pop3):
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen %L - lowercase
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen %U - uppercase
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen %E - escape '"', "'" and '\' characters by inserting '\' before them.
8e371a3ce32bd64288786855b8ce0cb63f19f7d1Timo Sirainen
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenYou can take a substring of the variable by giving optional offset followed
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenby '.' and width after the '%' character. For example %2u gives first two
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainencharacters of the username. %2.1u gives third character of the username. If
d6badc27cd6e8d3398877b6766cb0aaeef3a7800Timo Sirainenoffset points outside the value, empty string is returned.
d6badc27cd6e8d3398877b6766cb0aaeef3a7800Timo Sirainen