1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Imap connection issues

Discussion in 'Plesk 11.x for Linux' started by ErwanG, May 2, 2012.

  1. ErwanG

    ErwanG Regular Pleskian

    20
    57%
    Joined:
    Apr 29, 2010
    Messages:
    121
    Likes Received:
    0
    Imap problem with 5 connections

    Hello,

    One of my customer has a imap account installed on a Ipad, Iphone, Mac... Server : Plesk 10.4.4 (Centos).
    Alternately, the account connection doesn't work ("impossible to connect to imap.xxx.com...").

    I've modify imap file with this :
    MAXDAEMONS=80
    MAXPERIP=40

    And after "service courier-imap restart".

    But there is always the problem...

    An idea ?
    Thank you.
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    What sort of related errors in /usr/local/psa/var/log/maillog?
     
  3. ErwanG

    ErwanG Regular Pleskian

    20
    57%
    Joined:
    Apr 29, 2010
    Messages:
    121
    Likes Received:
    0
    I don't know if this connection was an error or not.. but there is a lot of (i think so correct) :

     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    Does this specified number of connections per IP works for non-Apple gadgets?
     
  5. ErwanG

    ErwanG Regular Pleskian

    20
    57%
    Joined:
    Apr 29, 2010
    Messages:
    121
    Likes Received:
    0
    It's ok with BlackBerry Torch...
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
    Do you have installed all available microupdates?
     
  7. DaveKay

    DaveKay Regular Pleskian

    17
    85%
    Joined:
    Jan 2, 2012
    Messages:
    226
    Likes Received:
    0
    Over the last few months I've had a number of clients calling for support in relation to iPhones connecting to imap mailboxes.

    Having looked through the mail error logs, I've noticed a number of multiple disconnects from the same client at the same time. Sometimes up to 10 disconnects at the same time, relating to the time that they can no longer connect to the mailbox.

    Having done some Googling, I've found a number of issues relating to gmail imap connection issues matching the same circumstances. At the time of these issues, attentions were turned to the gmail server config.

    Due to the frequency that I'm receiving these support calls, I'm fairly certain that this is an iOS issue which is possibly not connected to config of qmail, but is there anything that can be changed within the imap configuration to gracefully disconnect clients after a certain time to stop the iPhone from making multiple connections and bombing out with connection errors.

    My thoughts are the iPhone connects to the mailbox, loses it's data connection but iOS thinks the connection is still open (by using connection tags). When it can't connect to the original connection, it opens a new one and the circle goes on.

    Any thoughts appreciated.
     
  8. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Does this KB help: http://kb.parallels.com/en/113841
    It explains how to increase the number of concurrent connections and it might possibly help even though it doesn't seem to be the real problem.

    If not, you may find a timeout setting in that configuration file which could possibly be increased?
     
  9. DaveKay

    DaveKay Regular Pleskian

    17
    85%
    Joined:
    Jan 2, 2012
    Messages:
    226
    Likes Received:
    0
    Hi Faris, thanks for the reply!

    I applied the resolution in the KB article the first time I had this issue reported by a client, and it seemed to fix things for the last 6 months.

    This recent issue was a new mailbox setup on an iPhone only a few days ago.

    Couldn't find any connection timeout options in the config file.

    Oh well, will just have to keep an eye on it and suggest a phone restart -seems to work. Not ideal though, what with Apple lovers presuming their devices are perfect ;)
     
  10. FernandoI

    FernandoI New Pleskian

    19
    35%
    Joined:
    Nov 13, 2009
    Messages:
    9
    Likes Received:
    0
    Hello DaveKay, I've noticed the exact same problem with my 11.0.9 installation, In fact, the only way I can get the iPhones to reconnect to the IMAP accounts it's by deleting the account in the iOS and configuring it again, but eventually the iOS device can loose the access randomly. I've tried increasing the number of connections by IP in courier-imap config with no luck. I hope Parallels support team can check this issue soon.
    Greetings.
     
  11. DaveKay

    DaveKay Regular Pleskian

    17
    85%
    Joined:
    Jan 2, 2012
    Messages:
    226
    Likes Received:
    0
    Hi Fernando,

    The issue can be a real pain! Unfortunately, I don't believe it's actually an issue within Plesk/Courier, but a compounded issue with iOS as it's well documented that GMail imap had the same issue a while back. Not sure what their fix was or even if they did actually fix it!

    Can't imagine there's likely to be a solid fix anytime soon!
     
  12. MislavO

    MislavO Regular Pleskian

    16
    85%
    Joined:
    Jul 20, 2012
    Messages:
    271
    Likes Received:
    1
    Location:
    Croatia
    If we are talking about GMAIL service (by that i mean google aps accounts), your clients MUST enable option to enable IMAP in their own account.

    They can do that by login into their gmail accounts, clicking on that wheel on the right side under the account name -> Settings -> Forwarding and POP/IMAP -> IMAP Access -> Enable IMAP. Save changes.
     
  13. DaveKay

    DaveKay Regular Pleskian

    17
    85%
    Joined:
    Jan 2, 2012
    Messages:
    226
    Likes Received:
    0
    MislavO,

    You've misunderstood the issue. The problem is with iPhones accessing mailboxes hosted on a Plesk server using imap. I was simply referring to a similar issue with gmail account imap issues - a know problem with iOS.
     
  14. zconsulting

    zconsulting Basic Pleskian

    9
     
    Joined:
    Mar 11, 2013
    Messages:
    25
    Likes Received:
    0
    Imap connection issues and iPhone

    Just a few observations:

    restarting the iPhone does not resolve the issue...

    Changing connection type (i.e.: from WiFi to 3G) does not resolve the issue...

    The only thing that seems to help is to change the incoming mail server; for example: change from mail.domain.com to imap.domain.com or domain.com or alternate.domain.com (of course, make sure you create A records for those subdomains in your server's DNS)

    I suspect that this has to do with the self-signed security certificates that Plesk uses...
    I have not tried purchasing a real security certificate, as i cannot currently afford it... (Plus, i'm not sure that would even work since my hosting provider's server name is the one that always appears as the root for the security vert)

    I hope this helps!

    PS: To Parallels tech support: please pay attention to this issue: i use two different servers, one is a Plesk 11.0.9 on CentOS, and the other is a Plesk 9.3 on CentOS 5.6 and they BOTH produce the exact same error, and the 'workaround' listed above is the ONLY thing that works for both...

    EDIT:

    Deleting the account and re-entering it (using the same values for server address) has *not* worked in any of the cases (at least 200 times with 12 or so iPhones)...
    Deleting iPhone network settings does *not* resolve the issue
    Pairing any of these failed attempts with restarts does *not* work at all...

    Note that i have also increased the MAXPERIP and MAXDAEMONS variables for both imap and pop3 (i read somewhere that iPhones were using pop3 authentication for IMAP connections) -- vell, that did not resolve the issue either.

    The only thing that seems to work is to change the iPhone configuration so that you get the message, at configuration time, to accept or not the server's unverified security certificate.
     
    Last edited: Mar 11, 2013
  15. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    I found a really old 8.x-related thread which has a suggestion about this: http://forum.parallels.com/showthread.php?t=84532

    In it, FranklinT says:

     
  16. zconsulting

    zconsulting Basic Pleskian

    9
     
    Joined:
    Mar 11, 2013
    Messages:
    25
    Likes Received:
    0
    Thank you for the input;
    I have to say i've never tried that...

    The odd thing is that it really is only iPhones that have this problem...

    I'll definitely report back if this solves the issue...

    what about the IMAP_CAPABILITY_ORIG variable? Does it matter? Should IDLE be disabled here too?
     
  17. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    In order to more quickly get to the bottom of this, please can I ask people who are affected to post a message here with the details requested by Igor in http://forum.parallels.com/showthread.php?t=106113

    Basically (without changing the headings - post info below each heading please) we need posts with this info:
    ---------------------------------------------------------------
    PRODUCT, VERSION, MICROUPDATE, OPERATING SYSTEM, ARCHITECTURE

    PROBLEM DESCRIPTION

    STEPS TO REPRODUCE

    ACTUAL RESULT

    EXPECTED RESULT

    ANY ADDITIONAL INFORMATION
    --------------------------------------------------------------

    Under the ANY ADDITIONAL INFORMATION heading, please can you provide as much info on the iPhone being used as possible? .e.g Type (e.g. iPhone 4s) and iOS version. But please post even if you don't have this information to hand. We need to see if there's any correlation in terms of Plesk version and OS etc etc.

    ALSO please include information on the firewall you are using. e.g. Plesk firewall, APF, some other firewall.
    It might be helpful also to include details of any third-party utilities or applications that you might have installed, e.g. clamav, qmail-scanner, spamdyke....anything that might have any effect whatsoever with email, even if it isn't something you'd expect to directly come into the equation with IMAP.

    Please also post as much info as you can on the actual error messages (if any) that the user encounters on their phone, or any errors mentioned in any logs (if there is anything logged -- which doesn't seem to be the case).

    [zconsulting -- sorry, I'm not sure about that setting]
     
    Last edited: Mar 13, 2013
  18. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    p.s. to zconsulting -- real (but basic) SSL certificates can be had for next to nothing -- $25 or less. And I think I can arrange for you to have one at my cost price (which is obviously a bit less) if you are willing to give it a try? Send me a PM if you like. No hidden agenda, no catch - just trying to help.
     
  19. zconsulting

    zconsulting Basic Pleskian

    9
     
    Joined:
    Mar 11, 2013
    Messages:
    25
    Likes Received:
    0
    2 server specs

    First server is a shared server to which i have no ssh connection:

    The info from Plesk is as follows:
    psa v11.0.9_build110120608.16os_CentOS 5
    The sysadmin assures me that he set the following variables for 2 files in /etc/courier-imap/:
    For imapd:
    MAXDAEMONS=300 and MAXPERIP=200
    For pop3d:
    MAXDAEMONS=40 and MAXPERIP=4

    i'm afraid that's all i can get on that one...


    My server is a VPS:
    Plesk is 9.3.0 (Parallels Plesk Panel v9.3.0_build93110722.08 os_CentOS 5)
    CentOS build is: Linux 2.6.18-028stab099.3 (it is x86_64)
    cat /etc/redhat-release returns: CentOS release 5.9 (Final)
    i use the atomic repo for php
    On my system, the variables are:
    For imapd:
    MAXDAEMONS=240 and MAXPERIP=120
    For pop3d:
    MAXDAEMONS=180 and MAXPERIP=60


    PROBLEM DESCRIPTION:
    On iPhone only apparently at random, suddenly the Mail application will no longer be able to connect to the server saying something like: 'could not connect to the server' (something vague like that)
    When this happens, the mail account configuration still polls the server and emits no error (all checkmarks ok)


    STEPS TO REPRODUCE:
    Check your mail on your iPhone...
    Seriously though... There is no predicting when this will happen, but once it does, it does not stop, even if you change WiFi network or go to 3G/EDGE.
    Removing the account and re-creating it with the same values does not solve the issue either


    TEMPORARY SOLUTION:
    One solution that works every time (for a little while at least) is to change the incoming mail server to one not previously used:
    i.e.: from mail.domain.com to imap.domain.com or alternate.domain.com or simply domain.com (as long as DNS A records exist on the server)


    I hope this helps
    Peter

    PS: to Faris Raouf, i've tried the free SSL cert from StartSSL, but that only provides a personal cert, not a real http and email server cert, correct?
     
    Last edited: Mar 13, 2013
  20. Lancemont

    Lancemont New Pleskian

    6
    20%
    Joined:
    Mar 27, 2013
    Messages:
    2
    Likes Received:
    0
    Hi,

    I had the same problem, I checked on my own iPhone that the problem appeared after I sent my first mail...
    After sending, my iPhone tried to create a new folder on IMAP named "Sent Messages" then it was impossible to synchronize the IMAP after that.

    Is it possible that the default directory rules for new mails are not compatible with iOS, that the system won't create new folders
    As example I'm not allowed on IMAP to delete the folder "Trash" but for iOS this folder must be named "Deleted Messages"
    The same for the sent messages, server default "Sent" iOS default "Sent Messages"

    My config:
    OS Ubuntu 12.04 LTS
    Version de Parallels Panel 11.0.9 Mettre à jour #44
    Le système est à jour ; dernière vérification le Mar 31, 2013 06:55 AM

    Yes I'm a french User ;-)

    So may be this is the reason... some ideas?? Sorry no solution for this for the moment

    Steve
     
Loading...