Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > IMAP users unable to login after OS migration (from RHEL 4 to RHEL 6)
Troubleshooting Icon.png
Troubleshooting
Product ConnectXf
Version All
Applies to Administrators
Level Advanced



IMAP users unable to login after OS migration (from RHEL 4 to RHEL 6)

Symptoms

  • Os is migrated from version RHEL 4 to RHEL 6.
  • After migration, IMAP users are unable to login to the server.

Diagnosis

  • Check if user can login through Telnet to the port 143.
 telnet localhost 143

If you receive following error indicates you can connect to the server through the port 143 but unable to login.

[root@mailserverbeekaycorp ~]# 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 ACL ACL2=UNION STARTTLS]   
Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. a login testmithi@beekaycorp.com mailjol@123 Connection closed by foreign host.
  • Check if POP users are able to login to the server.

Verify this by using Telnet to the port 110.

 telnet localhost 110

If POP users are able to login to the server confirms the issue is for IMAP users only.


  • Check if the issue is related to the memory allocated for IMAP processing on the server.

For this check the maillog and search for the string Cannot allocate memory or error while loading shared libraries

cat /var/log/maillog | egrep -i 'Cannot allocate memory'

Following sample log shows the memory allocation error.


 Feb 5 10:08:23 Mail9 imapd: /mithi/mcs/modules/mithi-bl/admin/bl/bin/imapaccesscontrol: error while loading shared libraries: libicui18n.so.42: failed to map segment from shared object: Cannot allocate memory
 Feb 5 10:09:01 Mail9 imapd: /mithi/mcs/modules/mithi-bl/admin/bl/bin/imapaccesscontrol: error while loading shared libraries: libicui18n.so.42: failed to map segment from shared object: Cannot allocate memory
 Feb 5 10:09:13 Mail9 imapd: /mithi/mcs/modules/mithi-bl/admin/bl/bin/imapaccesscontrol: error while loading shared libraries: libicui18n.so.42: failed to map segment from shared object: Cannot allocate memory
 Feb 5 10:09:34 Mail9 imapd: /mithi/mcs/modules/mithi-bl/admin/bl/bin/imapaccesscontrol: error while loading shared libraries: libicui18n.so.42: failed to map segment from shared object: Cannot allocate memory
 Feb 5 10:09:51 Mail9 imapd: /mithi/mcs/modules/mithi-bl/admin/bl/bin/imapaccesscontrol: error while loading shared libraries: libicui18n.so.42: failed to map segment from shared object: Cannot allocate memory

  • Check the value of memory allocated for the IMAP process using following command.
grep -i ^IMAP_ULIMITD /usr/lib/courier-imap/etc/imapd

If the output of the command is 65536 confirms the issue is related to the memory allocated for the IMAP process.

Cause

IMAP_ULIMITD sets the maximum size of the data segment of the server process. The argument to ulimi sets the upper limit on the size of the data segment of the server process, in kilobytes. The default value of 65536 sets a very generous limit of 64 megabytes.

RHEL 6 requires 261144 KB memory for IMAP process.

After migration of OS from RHEL 4 to RHEL 6, you need to upgrade the memory allocated for IMAP process from 65536 KB to 261144 KB.

In case, if you forgot to do so IMAP users may face issue in logging on the server.

Solution

Change the value of IMAP_ULIMITD to 261144 KB for RHEL 6.


To change the value follow the below procedure,

1. It is a good practice to take a back-up of the "imapd" file which you are going to change.

cp /usr/lib/courier-imap/etc/imapd /usr/lib/courier-imap/etc/imapd.org.date

2. Open the "imapd" file in vi editor

vi /usr/lib/courier-imap/etc/imapd

3. Find the string IMAP_ULIMITD in the file

4. Change the value from 65536 to 261144

5. Restart the courier-imap service using following command

/etc/init.d/courier-imap restart