digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Website and Server Troubleshooting (https://www.digitalfaq.com/forum/web-tech/)
-   -   Login problems with IMAP, CentOS Plesk 9 [solved] (https://www.digitalfaq.com/forum/web-tech/2204-login-problems-imap.html)

kpmedia 04-29-2010 05:01 PM

Login problems with IMAP, CentOS Plesk 9 [solved]
 
Ran into an issue today, setting up courier-imap service on Plesk 9 Linux/CentOS. The docs said to access via SSH (root secure shell), and I use Putty in Windows.

Testing the IMAP was easy,
Code:

telnet localhost 143
and if successful, you'll get this long server response code:
Code:

Trying 127.0.0.1...
Connected to localhost.domains.com (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc. See COPYING for distribution information.

Now, I already have POP+IMAP email accounts set up in Plesk, for my domain. So I'm skipping this step in this forum post. Obviously you have to have an email account setup before you're allowed to log in to one!

For account login, it said to use this
Code:

login test@domains.com password
...but that's not correct. You'll get this:
Code:

login NO Error in IMAP command received by server.
It's not "no errors" but NO as in DENIED LOGIN and the error is "Error in IMAP command received by server"

You need to add a number in front of it. Example:
Code:

1 login test@domains.com password
and then you'll get a successful login:
Code:

[root@fh ~]# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.
1 login test@domains.com password
1 OK LOGIN Ok.

Easy enough. :)


Sources:
- mediatemple has a doc on this, too, for more in-depth troubleshooting (if needed): http://kb.mediatemple.net/questions/...ny+problems%3F
- Qmail forums at http://forum.qmailrocks.org/showthre...?t=1405&page=2

kpmedia 04-29-2010 05:18 PM

Oh yeah, one more thing...

Parallels (Plesk) is wrong, too. Or at least misleading, from the way they've written it.
See their knowledge base article at http://kb.parallels.com/en/1418 says to

Quote:

Check if courier-imap is running:
Code:

ps ax | grep courier
Nope, that's wrong for the CentOS Plesk 9 server I was logged into.
ps ax is not a valid syntax on that box
A bit misleading for those of us that don't live in a Linux shell.

Testing for IMAP is done with telnet domain 143 or telnet xx.xx.xx.xx(IP) 143 while logged into root. If it logs in, IMAP is there. If not, then IMAP is not installed (or misconfigured/etc). Logging in is the test.

Code:

grep courier
is the text to search for a running process named courier

Hope that helps you. And if it does, register/login and let me know! :)

kpmedia 04-29-2010 05:21 PM

Note sure if I need this yet, saving quote/bookmark here for later...

Quote:

By default, UNIX-based servers running Plesk and the Courier-IMAP e-mail server drastically limit the number of inbound connections to prevent users from opening up too many concurrent sessions. Unfortunately, this artificially-low restriction can impact legitimate users who have multiple computers connecting to the Courier-IMAP server from behind a firewall or a single computer that runs an IMAP client that takes advantage of mailbox caching.

Plesk comes configured with a limit of 4 connections per IP address and a limit of 40 connections total. Modern IMAP clients such as Mozilla Thunderbird use mailbox caching to open up multiple connections to increase performance. In the case of Thunderbird, it opens up 5 connections by default which is already 1 connection more than Courier-IMAP’s default restriction. Add another few family or corporate computers behind a firewall and those additional users won’t be able to connect at all since a single Thunderbird client is already utilizing all 4 connections.

To increase this restriction, modify the /etc/courier-imap/imapd configuration file and change MAXDAEMONS and MAXPERIP to a more sane number. In the case of my configuration, I changed MAXDAEMONS from 40 to 80 and MAXPERIP from 4 to 40. This allows all the machines behind my home firewall to connect to multiple accounts on the e-mail server with mailbox caching enabled.

But even those numbers may be too low for a corporate colocated server that services an entire company. Tweak those numbers based on your employee base; if 50 employees are connecting to the e-mail server from behind the same firewall then MAXPERIP could need to go as high as 250 (50 employees times 5 cached mailbox connections). Add e-mail clients of people working from home and MAXDAEMONS could go as high as 300 or 400.

Obviously, the connection limits are to prevent the Courier-IMAP server from using too many memory and CPU resources on the machine. Tweak the numbers based on the memory footprint of each daemon process and how much memory you have.
From http://www.inertramblings.com/2006/0...s-under-plesk/


All times are GMT -5. The time now is 12:50 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.