Rob's web

POP3 and IMAP

In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by e-mail clients to retrieve e-mail from a mail server.

POP version 3 (POP3) is the version in common use.

In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by RFC 3501.

IMAP was designed with the goal of permitting complete management of an email box by multiple email clients, therefore clients generally leave messages on the server until the user explicitly deletes them. An IMAP server typically listens on port number 143. IMAP over SSL (IMAPS) is assigned the port number 993.

Virtually all modern e-mail clients and servers support IMAP, which along with the earlier POP3 (Post Office Protocol) are the two most prevalent standard protocols for email retrieval. Many webmail service providers such as Gmail, Outlook.com and Yahoo! Mail also provide support for both IMAP and POP3.

Installation

# yum install dovecot

Configuration

# cd /etc/dovecot
# ll
drwxr-xr-x. 2 root root 4096 17 nov 02:28 conf.d
-rw-r--r--. 1 root root 4380 30 apr  2018 dovecot.conf

dovecot.conf doesn't need editing.

several files must be edited.

# cd /etc/dovecot/conf.d
ll
-rw-r--r--. 1 root root  5296 23 jun  2017 10-auth.conf
-rw-r--r--. 1 root root  1893 30 apr  2018 10-director.conf
-rw-r--r--. 1 root root  3062 30 apr  2018 10-logging.conf
-rw-r--r--. 1 root root 17579 30 sep 17:58 10-mail.conf
-rw-r--r--. 1 root root  3383 30 apr  2018 10-master.conf
-rw-r--r--. 1 root root  2486 30 sep 17:59 10-ssl.conf
-rw-r--r--. 1 root root  1668 30 apr  2018 15-lda.conf
-rw-r--r--. 1 root root  2808 23 jun  2017 15-mailboxes.conf
-rw-r--r--. 1 root root  4235 30 apr  2018 20-imap.conf
-rw-r--r--. 1 root root   936 23 jun  2017 20-lmtp.conf
-rw-r--r--. 1 root root  4065 30 apr  2018 20-pop3.conf
-rw-r--r--. 1 root root   676 23 jun  2017 90-acl.conf
-rw-r--r--. 1 root root   292 23 jun  2017 90-plugin.conf
-rw-r--r--. 1 root root  2597 30 apr  2018 90-quota.conf
# vi 10-auth.conf

disable_plaintext_auth = no

# vi 10-mail.conf

mail_location = maildir:~/.maildir

# vi 10-ssl.conf

ssl_cert = </etc/pki/tls/certs/example.com.crt
ssl_key = </etc/pki/tls/private/example.com.key

ssl_ca = </etc/pki/tls/certs/example.com_ca-bundle.pem

Starting

# systemctl start dovecot
# systemctl enable dovecot

Firewall

firewall-cmd --permanent --add-port=143/tcp
firewall-cmd --permanent --add-port=993/tcp
firewall-cmd --permanent --add-port=110/tcp
firewall-cmd --permanent --add-port=995/tcp
firewall-cmd --reload

Links