Dovecot - Install and setup for IMAP, IMAPS, POP3 and POP3S

1. Install dovecot

yum install dovecot

2. Backup default dovecot config

cp /etc/dovecot.conf /etc/dovecot.conf_orig

3. Set required protocols in dovecot config

vim /etc/dovecot.conf
protocols = imap imaps pop3 pop3s


4. Set postfix mailbox format

/usr/sbin/postconf -e 'home_mailbox = Maildir/'
/usr/sbin/postconf -e 'mailbox_command ='

5. Add/modify the following line in /etc/dovecot.conf to fix 5.1 upgrade issue on redhat/centos 64-bit

login_process_size = 64

6. Restart postfix

/etc/init.d/postfix restart

7. Start dovecot

/etc/init.d/dovecot start

8. Check maillog for errors/failures and correct startup

tail /var/log/maillog
Mar 10 04:30:38 vsv01 dovecot: Dovecot v1.0.rc15 starting up

9. Configure service to start at required runlevels

/sbin/chkconfig --level 345 dovecot on

10. Create DNS entry in your domain zone file (e.g. pop3s.atbnet.local)

pop3s IN A
imaps IN A

11. Check firewall rules allow pop3(110), pop3s(995), imap(220) and imaps(993) access

/sbin/iptables -nvL


vim /etc/sysconfig/iptables
-A INPUT -i lo -j ACCEPT
-A INPUT -s -p tcp --dport 110 -j ACCEPT
-A INPUT -s -p tcp --dport 995 -j ACCEPT
-A INPUT -s -p tcp --dport 220 -j ACCEPT
-A INPUT -s -p tcp --dport 993 -j ACCEPT



Share this blog post on social media:

Social Links


All advice, installation/configuration how to guides, troubleshooting and other information on this website are provided as-is with no warranty or guarantee. Whilst the information provided is correct to the best of my knowledge, I am not reponsible for any issues that may arise using this information, and you do so at your own risk. As always before performing anything; check, double check, test and always ensure you have a backup.

Copyright ©2008-2021 Andy Barnes - Please do not copy any content including images without prior consent!

Designed and Hosted by Andy Barnes