Dovecot is a IMAP/POP3 server.
To install on Debian/Ubuntu, run
apt install dovecot-core -y
To see dovecot config, run
root@ok:~# doveconf -n # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.13 (7b14904) # OS: Linux 4.4.0-62-generic x86_64 Ubuntu 16.04.3 LTS mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } ssl = no userdb { driver = passwd } root@ok:~#