FAQ

Page Discussion Edit History

MailProxyModule

Contents

Synopsis

Nginx can proxy IMAP, POP3, and SMTP protocols.

Directives

proxy

syntax: proxy on | off

default: off

context: mail, server

With this directive you can enable or disable the proxy for mail.

proxy_buffer

syntax: proxy_buffer size

default: 4K/8K

context: mail, server

With this directive you can set the buffer size for the proxy connection. The default value is equal to the size of a page (this can be either 4K or 8K depending on the platform).

proxy_pass_error_message

syntax: proxy_pass_error_message on | off

default: off

context: mail, server

With this directive you can pass authentification error messages obtained from the backend back to the client. Usually if authorization in nginx passed successfully then the backend cannot return errors back to the client.

But for some POP3 servers errors in response to correct password is a regular behavior. For example CommuniGatePro notifies user about overcrowding of the mailbox (or other events) periodically issuing an error in authorization. In this case is worth indicating proxy_error_message on.

proxy_timeout

syntax: proxy_timeout time

default: 24h

context: mail, server

With this directive you can set the timeout for the proxy connection.

xclient

syntax: xclient on | off

default: on

context: mail, server

With this directive you can enable or disable the command XCLIENT with the connection to SMTP backend. This allows the backend to enforce limitations on the client based on IP/HELO/LOGIN.

If xclient is enabled then nginx first transfers to the backend:

EHLO server_name

Then:

XCLIENT PROTO=ESMTP HELO=client_helo ADDR=client_ip LOGIN=authentificated_user NAME=[UNAVAILABLE] 

References