Posted on July 23rd, 2010
We are going to create very simple installation of imap service.
1. fetch imapd package from sunfreeware.com and install it.
2. add service to inetd configuration
echo "imap stream tcp nowait root /usr/local/sbin/imapd imapd" >> /etc/inetd.conf pkill -1 inetd
3. check the service is runnable from inetd
telnet 10.5.2.28 143 Trying 10.5.2.28... Connected to 10.5.2.28. Escape character is '^]'. * OK [CAPABILITY IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS LOGINDISABLED] ssm-srv IMAP4rev1 2006e.378 at Fri, 23 Jul 2010 12:34:19 +0400 (MSD)
If you are getting errors related to openssl library, add library path to your linker configuration:
crle -u -l /usr/local/ssl/lib
4. imapd version from sunfreeware only works with TLS. So you need to generate SSL certificate, otherwise authentication won’t work.
cd /usr/local/ssl/certs /usr/local/ssl/bin/openssl req -new -x509 -nodes \ -out imapd.pem -keyout imapd .pem -days 3650
5. Finally configure your email client. I’m using mutt. Part of muttrc configuration related to imap follows.
set imap_authenticators="plain" set spoolfile=imap://email@example.com/inbox set folder=imap://firstname.lastname@example.org/