# Mail proxy client timeout

**URL:** <https://www.ruby-forum.com/t/mail-proxy-client-timeout/191535>\
**Category:** NGINX\
**Created:** [July 14, 2010, 1:54am UTC](https://www.ruby-forum.com/t/mail-proxy-client-timeout/191535 "2010-07-14T01:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/46a35a/32.png) [@iceman](https://www.ruby-forum.com/u/iceman)\
**Post date:** [July 14, 2010, 1:54am UTC](https://www.ruby-forum.com/t/mail-proxy-client-timeout/191535/1 "2010-07-14T01:54:41Z")

</div>

Hi

I have a nginx server configured to handle imap mail traffic. i want to  
enforce the following

1. if downstream email client does not send a command for more than 2  
mins, the nginx proxy should disconnect.

2. if upstream server (real mail server) does not respond for more  
than  
5 mins or takes longer than 5 mins to respond, disconnect both upstream  
and downstream connections.

Does anyone have any ideas on doing this on nginx?

in ngx\_mail\_proxy\_module.c i see

```
{ ngx_string("proxy_timeout"),
  NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
  ngx_conf_set_msec_slot,
  NGX_MAIL_SRV_CONF_OFFSET,
  offsetof(ngx_mail_proxy_conf_t, timeout),
  NULL },

```

and in ngx\_mail\_core\_module.c

```
{ ngx_string("timeout"),
  NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
  ngx_conf_set_msec_slot,
  NGX_MAIL_SRV_CONF_OFFSET,
  offsetof(ngx_mail_core_srv_conf_t, timeout),
  NULL },

```

does anyone have any experience dealing with these or have any  
suggestions?

thanks!

Posted at Nginx Forum:

> **[mail proxy client timeout](https://forum.nginx.org/read.php?2,108508,108508#msg-108508)**
>
> Hi I have a nginx server configured to handle imap mail traffic. i want to enforce the following 1) if downstream email client does not send a command for more than 2 mins, the nginx proxy should disconnect. 2) if upstream server (real mail
