Install Dovecot on CentOS 7

Install Dovecot to configure POP/IMAP server. POP uses 110/TCP, IMAP uses 143/TCP

This example shows to configure to provide SASL function to Postfix.

[root@mail ~]# vi /etc/dovecot/dovecot.conf

# line 24: uncomment
protocols = imap pop3 lmtp

# line 30: uncomment and change ( if not use IPv6 )
listen = *

[root@mail ~]# vi /etc/dovecot/conf.d/10-auth.conf

# line 10: uncomment and change ( allow plain text auth )
disable_plaintext_auth = no

# line 100: add
auth_mechanisms = plain login

[root@mail ~]# vi /etc/dovecot/conf.d/10-mail.conf

# line 30: uncomment and add
mail_location = maildir:~/Maildir

[root@mail ~]# vi /etc/dovecot/conf.d/10-master.conf

# line 96-98: uncomment and add like follows
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}

[root@mail ~]# vi /etc/dovecot/conf.d/10-ssl.conf
# line 8: change (not require SSL)
ssl = no

[root@mail ~]# systemctl start dovecot

[root@mail ~]# systemctl enable dovecot

Dovecot automatically create a folders for us 🙂

vim /etc/dovecot/conf.d/20-imap.conf

At the end of file paste following code

plugin {
autocreate = Trash
autocreate2 = Junk
autocreate3 = Drafts
autocreate4 = Sent
autosubscribe = Trash
autosubscribe2 = Junk
autosubscribe3 = Drafts
autosubscribe4 = Sent
}

Results:

# Space separated list of plugins to load (default is global mail_plugins).

mail_plugins = $mail_plugins
plugin {
autocreate = Trash
autocreate2 = Junk
autocreate3 = Drafts
autocreate4 = Sent
autosubscribe = Trash
autosubscribe2 = Junk
autosubscribe3 = Drafts
autosubscribe4 = Sent
}

Having problems with folders?

Check out the /home/username/Maildir to see if all the directory are created. If not here is the list of folder to create:

.Trash
.Junk
.Drafts
.Sent

* Make sure to add the folders to roundcube in the “Manage Folders”

Also you have to Change ownership to user:user you have created.

Working now on the .Inbox problem, will keep you posted

Why I don’t receive my email into the .Inbox?

…,,,