Menu

#413 Multiple IMAP connections

closed-fixed
Read Mail (122)
5
2012-05-18
2012-05-17
Amish
No

I am using usermin-webmail for web access to mail account.

What I notice is that when I login to webmail, usermin makes 4 IMAP connections.

I would like to avoid this because when there are too many users accessing webmail, it loads the server unnecessarily.

So is there a config value which allows only 1 connection per webmail login?

Or is it just by design? If yes, is there anyway to improve this?

Thank you

Discussion

  • Jamie Cameron

    Jamie Cameron - 2012-05-17

    Do you mean it has 4 IMAP connections open at the same time, or it makes and closes 4 connections?

    I would expect at most 2, one for each frame in the Usermin UI.

     
  • Amish

    Amish - 2012-05-18

    Here is maillog output:

    It makes 4 connections and possibly disconnects. See the timestamp and pid, they all are connected and disconnected almost at same time.

    Is there a workaround to this?

    May 18 09:48:33 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19253, secured
    May 18 09:48:33 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19256, secured
    May 18 09:48:33 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19258, secured
    May 18 09:48:33 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19260, secured
    May 18 09:48:33 localhost dovecot: imap(myusername): Connection closed bytes=89/747
    May 18 09:48:33 localhost dovecot: imap(myusername): Connection closed bytes=91/747
    May 18 09:48:33 localhost dovecot: imap(myusername): Connection closed bytes=90/750
    May 18 09:48:33 localhost dovecot: imap(myusername): Connection closed bytes=447/14607
    May 18 09:48:33 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19266, secured
    May 18 09:48:34 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19268, secured
    May 18 09:48:34 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19272, secured
    May 18 09:48:34 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19274, secured
    May 18 09:48:34 localhost dovecot: imap(myusername): Connection closed bytes=73/717
    May 18 09:48:34 localhost dovecot: imap(myusername): Connection closed bytes=116/2921
    May 18 09:48:34 localhost dovecot: imap(myusername): Connection closed bytes=74/720
    May 18 09:48:34 localhost dovecot: imap(myusername): Connection closed bytes=74/715
    May 18 09:48:43 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19308, secured
    May 18 09:48:44 localhost dovecot: imap(myusername): Connection closed bytes=166/6737
    May 18 09:48:46 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19312, secured
    May 18 09:48:46 localhost dovecot: imap(myusername): Connection closed bytes=419/21805
    May 18 09:48:46 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19315, secured
    May 18 09:48:47 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19317, secured
    May 18 09:48:47 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19319, secured
    May 18 09:48:47 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19321, secured
    May 18 09:48:49 localhost dovecot: imap(myusername): Connection closed bytes=219/1647
    May 18 09:48:49 localhost dovecot: imap(myusername): Connection closed bytes=222/1656
    May 18 09:48:49 localhost dovecot: imap(myusername): Connection closed bytes=225/1647
    May 18 09:48:49 localhost dovecot: imap(myusername): Connection closed bytes=286/781353
    May 18 09:50:58 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19981, secured
    May 18 09:50:58 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19984, secured
    May 18 09:50:59 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19987, secured
    May 18 09:50:59 localhost dovecot: imap-login: Login: user=<myusername>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=19989, secured
    May 18 09:51:01 localhost dovecot: imap(myusername): Connection closed bytes=219/1647
    May 18 09:51:01 localhost dovecot: imap(myusername): Connection closed bytes=222/1656
    May 18 09:51:01 localhost dovecot: imap(myusername): Connection closed bytes=225/1647
    May 18 09:51:01 localhost dovecot: imap(myusername): Connection closed bytes=298/781541

     
  • Jamie Cameron

    Jamie Cameron - 2012-05-18

    I had a look into Usermin's IMAP code, and found that it does make un-necessary IMAP connections if you have multiple folders. This will be fixed in the next release .. or you can apply the code fix from https://github.com/webmin/webmin/commit/43f73bfd019b5ee885cb41870c4fbb4697a9f01a to /usr/{share,libexec}/usermin/mailbox/folders-lib.pl

     
  • Jamie Cameron

    Jamie Cameron - 2012-05-18
    • status: open --> closed-fixed
     
  • Amish

    Amish - 2012-05-18

    Thanks for quick fix.

    Since I am using live server, I just want to be sure that this fix does not pose any risk.

    i.e. its a simple fix which does not really require thorough testing.

    So is the patch really that safe to apply directly?

    I will put blind trust on ur words. And in anycase you will not be responsible :). I just need a go ahead nod.

    Thanks.

     
  • Jamie Cameron

    Jamie Cameron - 2012-05-18

    Yes, it is safe to apply. But keep a backup copy of the modified file, just in case..

     
  • Amish

    Amish - 2012-05-18

    Thanks for the answer. Does the same fix apply to webmin as well?

    Because I see files are identical.

    Thank you

     
  • Jamie Cameron

    Jamie Cameron - 2012-05-18

    Yes .. although webmin doesn't normally make IMAP connections.

     
  • Amish

    Amish - 2012-05-18

    Thanks again. As always, u r really fast at fixing things and even replying assertively.

     

Log in to post a comment.