Building IMAP-UW for CentOS
I use IMAP4 on my server. I only use it with SSL, and I don't use POP3. The implementation I have been using is IMAP-UW. Since it needs to compile with SSL support, the OpenSSL development libraries must be installed first.
NOTE! Building IMAP-UW may be redundant if you are also building pine from source, as IMAP-UW is included in the pine distribution. In that case, build and install imapd along with pine, then proceed to the configuration described below.
yum install openssl-devel yum install pam-devel make lr5 install -s -o root imapd/imapd /usr/local/libexec
I also have to create a configuration entry for xinetd. Create a file in /etc/xinetd.d called imap, containing the following. I guess a SUGHUP needs to be sent to the xinetd process.
# description: IMAP/SSL using IMAP-UW service imaps { flags = REUSE socket_type = stream wait = no user = root server = /usr/local/libexec/imapd }
Under CentOS, imapd wants to use PAM, and needs to be configured to use it. This is what I am trying first (creating a file called /etc/pam.d/imap):
#%PAM-1.0 auth required pam_shells.so auth include system-auth account required pam_nologin.so account include system-auth session optional pam_keyinit.so force revoke session include system-auth session required pam_loginuid.so
Finally, I need certificate files. On FreeBSD, I have a file that contains both the private key and the certificate. On this build, imapd is apparently looking for it at /etc/pki/tls/certs/imapd.pem
Well, this all seems to be working, except for reading my inbox. I moved some messages into my inbox, and that seemed to work, but Thunderbird didn't see them. When I closed Thunderbird and re-opened it, it knew the messages were there, even before I had authenticated. I need to get normal mail delivery working, and do more testing.