If you have recently updated your Red Hat Enterprise Linux Server release 5.1 (Tikanga) / CentOS 5.1, dovecot imap server might give out the following error:
Nov 5 13:21:13 p5ora1 dovecot: imap-login: imap-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory
Nov 5 13:21:13 p5ora1 dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1: failed to map segment from shared object: Cannot allocate memory
This error is not related to shared libraries. You need to set maximum process size in megabytes. If you don’t use login_process_per_connection you might need to grow this. Just open /etc/dovecot.conf file
# vi /etc/dovecot.conf
Find line read as follows:
Uncomment and set it to 64:
login_process_size = 64
Save and close the file. Restart dovecot imap server:
# /etc/init.d/dovecot restart
The Dovecot package on x86_64 (64 bit system) kernels requires the parameter “login_process_size = 64” to be added to /etc/dovecot.conf after an upgrade to RHEL / CentOS 5.1.
The Internet Message Access Protocol (commonly known as IMAP or IMAP4) is an application layer Internet protocol that allows a local client to access e-mail on a remote server. An IMAP protocol is used for e-mail retrieval. Virtually almost all modern e-mail clients and servers support IMAP.
E-mail messages are generally sent to an e-mail server that stores received messages in the recipient’s e-mail mailbox. The user later retrieves these messages with either a web browser or an e-mail client that uses one of a number of e-mail retrieval protocols. While some clients and servers preferentially use vendor specific, typically proprietary protocols, most support the Internet standard protocols SMTP for sending e-mail and POP3 and IMAP4 for retrieving e-mail, allowing interoperability with other servers and clients.
Iptables allow or open IMAP server port
Following ports used by default
=> IMAP Port 143
=> SMTP Port 25
You can use iptables to open port 143. Just append following rules to your iptables script. It uses the TCP port 143. Following two iptable rules allows incoming IMAP request on port 143 for server IP address 188.8.131.52 (open port 143):
iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 184.108.40.206 --dport 143 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s 220.127.116.11 --sport 143 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
In order to block port 143 simply use target REJECT instead of ACCEPT in above rules. If you are typing above rules at shell prompt save them:
# /etc/init.d/iptables save
# iptables-save > /path/to/script.sh