Hi,

It seems that I have a strange problem with some users of my Zimbra mail server.

It is happening randomly, and so, it's hard to diagnose.

Basically, sometimes, when a user send a mail, the client (Thunderbid mainly, but seems to happen with Outlook too, but I'm not sure), the mail program copies the sent email to the "Sent" Folder, and it's just keeping hang on this step.

The mail seems to be sent, but can't get copied to SentFolder and thunderbird stay stuck at "Copying message to Sent Items".

While stuck on this screen, to resolve the issue, there are 2 solutions for the client :

- Hitting "Cancel", and then hitting "Send" to re-send the mail. --> This time, the mail is sent again, and copied to the Sent folder without any problem/timeout.
- While stuck on the screen "Copying to Sent Folder", going back to the Thunderbird Interface, and just select another folder (Junk, Trash, a sub-Inbox folder, etc...). I think while doing this, Thunderbird create another connection to the server, and then, the mail can be copied to sent item.

I really don't know what could be the problem, my server is fine, and not under pressure.

It has 4Vcpu (XEON 5600), 10GB RAM.

I have 300 users on my mail server, with at high loads, about 200users connected at the same time, let's say 100 with web, 60 with IMAP, and 40 for POP3.

Here is a revelent log when the problem happens :

Code:
2013-01-03 20:05:38,836 INFO  [ImapSSLServer-343] [] imap - [81.84.19.53] connected
2013-01-03 20:05:39,594 INFO  [ImapSSLServer-343] [name=compte@company.com;ip=81.84.19.53;] imap - user compte@company.com authenticated, mechanism=PLAIN [TLS]
2013-01-03 20:05:47,112 INFO  [ImapSSLServer-344] [] imap - [81.84.19.53] connected
2013-01-03 20:05:47,876 INFO  [ImapSSLServer-344] [name=compte@company.com;ip=81.84.19.53;] imap - user compte@company.com authenticated, mechanism=PLAIN [TLS]
2013-01-03 20:05:48,793 INFO  [ImapSSLServer-344] [name=compte@company.com;ip=81.84.19.53;ua=Thunderbird/17.0;] index - IndexDeferredItems(null, 68700): Deferred count out of sync - found=22 in progress=0 (deferred count=20)
2013-01-03 20:05:49,010 INFO  [ImapSSLServer-344] [name=compte@company.com;ip=81.84.19.53;ua=Thunderbird/17.0;] index - Deferred Indexing: submitted 22 items in 218ms (100.92/sec). (0 items failed to index). IndexDeferredCount now at 22 NumNotSubmitted= 0
2013-01-03 20:05:49,016 INFO  [ImapSSLServer-344] [name=compte@company.com;ip=81.84.19.53;ua=Thunderbird/17.0;] mailop - Adding Message: id=30407, Message-ID=<50E5D660.6000400@company.com>, parentId=-1, folderId=5, folderName=Sent.
2013-01-03 20:06:31,667 INFO  [ImapSSLServer-336] [ip=81.84.19.53;] ProtocolHandler - I/O error while processing connection: java.net.SocketException: Connection timed out
2013-01-03 20:06:31,672 INFO  [ImapSSLServer-336] [ip=81.84.19.53;] imap - dropping connection for user compte@company.com (server-initiated)
2013-01-03 20:12:43,545 INFO  [ImapSSLServer-343] [name=compte@company.com;ip=81.84.19.53;ua=Thunderbird/17.0;] mailop - Adding Message: id=30409, Message-ID=<50E5D82F.4010805@company.com>, parentId=-1, folderId=5, folderName=Sent.
2013-01-03 20:12:44,611 INFO  [ImapSSLServer-343] [name=compte@company.com;ip=81.84.19.53;ua=Thunderbird/17.0;] imap - dropping connection for user compte@company.com (LOGOUT)
(IP and mails Changed)

I think the problem appears here :

2013-01-03 20:06:31,667 INFO [ImapSSLServer-336] [ip=81.84.19.53;] ProtocolHandler - I/O error while processing connection: java.net.SocketException: Connection timed out

Also, I have the same message for POP3, so I assume it's also happening in POP3 mode :

Here some of my settings :

data_source_imap_reuse_connections = false
imap_authenticated_max_idle_time = 1800
imap_inactive_session_cache_size = 10000
imap_max_idle_time = 60
imap_max_request_size = 10240
imap_use_ehcache = true
javamail_imap_debug = false
javamail_imap_enable_starttls = true
javamail_imap_test_timeout = 20
javamail_imap_timeout = 60
zimbra_session_limit_imap = 50


zimbra@mail:/$ zmlocalconfig | grep timeout
cbpolicyd_bypass_timeout = 30
cbpolicyd_timeout = 120
cli_httpclient_soaphttptransport_so_timeout = 0
httpclient_convertd_so_timeout = -1
httpclient_external_client_connection_timeout = 30000
httpclient_external_connmgr_connection_timeout = 25000
httpclient_external_connmgr_idle_reaper_connection _timeout = 300000
httpclient_external_connmgr_so_timeout = 60000
httpclient_internal_client_connection_timeout = 30000
httpclient_internal_connmgr_connection_timeout = 25000
httpclient_internal_connmgr_idle_reaper_connection _timeout = 300000
httpclient_internal_connmgr_so_timeout = 60000
httpclient_soaphttptransport_so_timeout = 300000
javamail_imap_test_timeout = 20
javamail_imap_timeout = 60
javamail_pop3_test_timeout = 20
javamail_pop3_timeout = 60
javamail_smtp_timeout = 60
ldap_common_writetimeout = 0
ldap_connect_pool_timeout = 120000
ldap_connect_timeout = 30000
ldap_read_timeout = 0
milter_write_timeout = 10
socket_connect_timeout = 30000
socket_so_timeout = 30000
xmpp_client_idle_timeout = 600000
xmpp_client_write_timeout = 60000
xmpp_cloudrouting_idle_timeout = 300000
xmpp_muc_idle_user_timeout_ms = 0
xmpp_server_read_timeout = 180000
zimbra_admin_waitset_default_request_timeout = 300
zimbra_admin_waitset_max_request_timeout = 3600
zimbra_admin_waitset_min_request_timeout = 0
zimbra_archive_formatter_disable_timeout = true
zimbra_gal_sync_disable_timeout = true
zimbra_noop_default_timeout = 300
zimbra_noop_max_timeout = 1200
zimbra_noop_min_timeout = 30
zimbra_session_timeout_soap = 600
zimbra_waitset_default_request_timeout = 300
zimbra_waitset_max_request_timeout = 1200
zimbra_waitset_min_request_timeout = 30

Don't really know what should I tweak to correct this...