This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 5 and 6
Revision 5 as of 2019-04-07 16:02:38
Size: 2104
Editor: AkiTuomi
Comment:
Revision 6 as of 2021-09-24 15:08:38
Size: 80
Editor: TimoSirainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Forwarding parameters in IMAP/POP3/LMTP/SMTP proxying =

Dovecot supports proxying various pieces of information and even variables for various protocols when forwarding connection.
It requires that the sender is listed under `trusted_networks`. For IMAP, it uses the `ID` command, for other protocols, `XCLIENT` is used.

This feature is supported since v1.2, except for x-forward which was added in v2.2.29.

== IMAP protocol ==

For IMAP protocol, this is done by extending the ID command. The maximum length of parameters to parse is 255 bytes.
The parameters are forwarded as part of the ID command key-value list.

`5 ID (x-originating-ip "127.0.0.1" x-originating-port "143"... )`

=== Supported parameters ===

 * `x-originating-ip` - Client IP
 * `x-originating-port` - Client port
 * `x-connected-ip` - Server IP
 * `x-connected-port` - Server port
 * `x-proxy-ttl` - TTL which is reduced by each hop, loop prevention. When TTL drops to 0, the connection is dropped.
 * `x-session-id` / `x-session-ext-id` - Session ID to be used.
 * `x-forward-<variable_name>` - Forwarded variable, see [[Variables]]

== POP3 protocol ==

For POP3 protocol, this is done with custom `XCLIENT` command which accepts a space separated list of key=value parameters.

=== Supported parameters ===

 * `ADDR` - Client IP
 * `PORT` - Client port
 * `SESSION` - Session ID
 * `TTL` - TTL which is reduced by each hop, loop prevention. When TTL drops to 0, the connection is dropped.
 * `FORWARD` - Base64 encoded key=value parameter to be stored.

== SMTP/LMTP protocol ==

See http://www.postfix.org/XCLIENT_README.html

 * `ADDR` - Client IP, IPV6: prefix is needed for IPv6.
 * `PORT` - Client port
 * `SESSION` - Session ID
 * `HELO` - Original HELO/EHLO
 * `LOGIN` - Original LOGIN value
 * `TIMEOUT` - Original TIMEOUT
 * `TTL` - TTL which is reduced by each hop, loop prevention. When TTL drops to 0, the connection is dropped.
 * `PROTO` - Forwarded protocol, can be one of SMTP, ESTMP, LMTP.
 * `FORWARD` - Base64 encoded key=value parameter to be stored.
Moved to https://doc.dovecot.org/developer_manual/design/parameter_forwarding/

None: Design/ParameterForwarding (last edited 2021-09-24 15:08:38 by TimoSirainen)