Dovecot is the most popular email solution for Linux. It supports POP, SMTP and IMAP as desired. The goal is to have the mail be acceptable to Microsoft Outlook etc/
sudo apt install dovecot-core dovecot-imapd sudo apt install dovecot-pop3d sudo apt install dovecot-lmtpd
Once the components are installed the real work of configuring the mail can begin.
sudo nano /etc/dovecot/dovecot.conf
You need to add some lines to to enable IMAP and POP3:
protocols = imap pop3
While POP is not as widely used as IMAP it is still helpful for those using older mail packages.
sudo nano /etc/dovecot/conf.d/10-ssl.conf
You need to enable SSL to be required which will leverage the certificates.
ssl = required
Also you need fix this to enable your CERTBOT KEYS
ssl_cert = </etc/dovecot/private/dovecot.pem ssl_key = </etc/dovecot/private/dovecot.key
Now your existing linux account will become firstname.lastname@example.org etc, so you will need to use the
sudo adduser spambot
Along with any other desired user names. The fun with user name spambot is extra amusing with its peculiarities by nature. Once the user account is done then the BASH script needs to set a mailbox etc.