Friday, October 19, 2007

Dovecot imaps-pop3s with openssl and squirrelmail

Written by Paul Matthews

Name: Dovecot
HomePage: http://dovecot.org/
Function: Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written with security primarily in mind.

Name: Apache
HomePage: http://www.apache.org/
Function: Webserver

Name: Squirrel Mail
Homepage: http://www.squirrelmail.org/
function: Webmail client, used to check e-mails from anywhere in world, via the internet, like gmail or hotmail

Name: OpenSSL
HomePage: http://www.openssl.org/
Function: developed for transmitting private documents via the Internet using cryptographic a system





1. First let’s turn off dovecot

/etc/init.d/dovecot stop

2. firstly lets remove the default dovecot ssl certificate

rm /etc/pki/dovecot/certs/dovecot.pem

3. Next lets make the openssl certificates

openssl req \
-new -x509 -nodes -out /etc/pki/dovecot/certs/cert.pem \
-keyout /etc/pki/dovecot/private/key.pem -days 999999

4. Now we need to edit the dovecot.conf file

nano /etc/dovecot.conf



dovecot.conf:
protocols = imaps pop3s
ssl_disable = no

ssl_cert_file = /etc/pki/dovecot/certs/cert.pem
ssl_key_file = /etc/pki/dovecot/private/key.pem



ssl_parameters_regenerate = 168




5. Now start dovecot

/etc/init.d/dovecot start

6. Now start apache

/etc/init.d/httpd start

7. Now setup squirrelmail to accept mail on the 'imaps' port

/usr/share/squirrelmail/config/conf.pl

choose:

2. Server Settings

choose:

A. Update IMAP Settings : localhost:143 (other)

choose:

5. IMAP Port : 143
7. Secure IMAP (TLS) : false

change to:

5. IMAP Port : 993
7. Secure IMAP (TLS) : true

save your settings and exit.

8. Now go to http://ip-address-of-your-apache-server/webmail and login.

No comments:

Post a Comment