view doc/variables.txt @ 2368:1ce02ffc7ec7 HEAD

Added support for %offset.width format in variables.
author Timo Sirainen <tss@iki.fi>
date Mon, 26 Jul 2004 19:39:18 +0300
parents 4e77cb0aff21
children 322b580e0eb4
line wrap: on
line source

You can use special variables in several places:
 - default_mail_env setting
 - namespace locations
 - static userdb template string
 - LDAP and SQL userdb query strings
 - log prefix for imap/pop3 process

The variables are:

 %u - username
 %n - user part in user@domain, same as %u if there's no domain
 %d - domain part in user@domain, empty if user there's no domain
 %h - home directory
 %p - protocol (IMAP or POP3)
 %P - PID of the current process (login or imap/pop3 process)
 %l - local IP address
 %r - remote IP address

You can apply a modifiers for each variable (eg. %Lp = pop3):

 %L - lowercase
 %U - uppercase
 %E - escape '"', "'" and '\' characters by inserting '\' before them.

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
characters of the username. %2.1u gives third character of the username. If
offset points outside the value, empty string is returned.