Dovecot
Dovecot is a Mail Delivery Agent (IMAP, POP3), written with security primarily in mind.
Install and configure in Ubuntu 14.04 LTS
1 apt install dovecot-imapd dovecot-pop3d
2 # create self-signed ssl sertificate? yes
3 # hostname: mail.example.org
4 service dovecot status
5 postconf -e 'home_mailbox = Maildir/'
6 service postfix restart
7 vim /etc/dovecot/conf.d/10-mail.conf
8 #mail_location = maildir:/home/%u/Maildir
9 service dovecot restart
10 openssl s_client -connect localhost:993 # check IMAPS connection, port 993
11
A1 LOGIN userx passwordx A2 LIST "" "*" A3 EXAMINE INBOX
Create self signed cert
1 cd /etc/dovecot
2 openssl genrsa -out server.key 2048
3 openssl req -new -key server.key -out server.csr
4 ###
5 Country Name (2 letter code) [AU]:PT
6 State or Province Name (full name) [Some-State]:
7 Locality Name (eg, city) []:
8 Organization Name (eg, company) [Internet Widgits Pty Ltd]:mail.bitarus.mooo.com
9 Organizational Unit Name (eg, section) []:mail.bitarus.mooo.com
10 Common Name (e.g. server FQDN or YOUR name) []:mail.bitarus.mooo.com
11 Email Address []:vitor@bitarus.mooo.com
12 Please enter the following 'extra' attributes
13 to be sent with your certificate request
14 A challenge password []:
15 An optional company name []:
16 ####
17 openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
18 chmod o= server.key
19 openssl x509 -in server.crt -text
20 service dovecot restart
21 openssl s_client -connect mail.bitarus.mooo.com:993