This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 1 and 2
Revision 1 as of 2006-11-05 15:35:36
Size: 1781
Editor: TimoSirainen
Comment:
Revision 2 as of 2009-03-15 22:35:24
Size: 1783
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Login referrals are an IMAP extension specified by [http://www.apps.ietf.org/rfc/rfc2221.html RFC 2221]. They're not supported by many clients, so you probably don't want to use them normally. Login referrals are an IMAP extension specified by [[http://www.apps.ietf.org/rfc/rfc2221.html|RFC 2221]]. They're not supported by many clients, so you probably don't want to use them normally.

Login referrals

Login referrals are an IMAP extension specified by RFC 2221. They're not supported by many clients, so you probably don't want to use them normally.

Login referrals can be used in two ways:

  1. Tell the client to log into another server without allowing to log in locally.
  2. Suggest the client to log into another server, but log it in anyway.

The following fields can be used to configure login referrals:

  • host=s: The destination server's hostname. This field is required for login referrals to be used.

  • port=s: The destination server's port. The default is 143.

  • destuser=s: Tell client to use a different username when logging in.

  • reason=s: Optional reason to use as the reply to the login command. The default is "Logged in, but you should use this server instead."

Using the above settings you can suggest client to log in elsewhere. To require it, you'll also have to return:

  • nologin: User is not allowed to log in.

  • reason=s: Optional reason. The default is "Try this server instead.".

Client support

The following clients are known to support login referrals:

  • Pine
  • Outlook (but not Outlook Express)

Examples

Forward user to another server after successful authentication:

password_query = SELECT password, host, 'Y' as nologin FROM users WHERE userid = '%u' 

Forward all users to another server without authentication:

# NOTE: '\' line splitting is used only for readability, currently Dovecot doesn't support it
password_query = \
  SELECT NULL AS password, \
  'imap2.example.com' AS host, \
  'This server is down, try another one.' AS reason, \
  'Y' as nologin, \
  'Y' as nodelay 

None: PasswordDatabase/ExtraFields/Host (last edited 2022-02-04 22:52:16 by TimoSirainen)