Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
catch-all mail server installation on ubuntu
# redirect MX record to your server ip
apt install postfix
adduser myuser # necessary - you cannot login as root on dovecot imap
# add user
nano /etc/postfix/virtual
# @example.com myuser
# info@example.com info # optional
postmap /etc/postfix/virtual
nano /etc/postfix/main.cf
# add this to the end of main.cf
# virtual_alias_maps = hash:/etc/postfix/virtual
systemctl reload postfix
# postfix installation is done
# now we will install dovecot for IMAP auth
apt install dovecot-imapd dovecot-pop3d
nano /etc/dovecot/conf.d/10-auth.conf
# disable_plaintext_auth = no
# auth_mechanisms = plain login
systemctl enable dovecot.service
# done, you can test using:
apt install mutt
mutt -f imap://myuser@example.com
# thanks to:
# https://tecadmin.net/setup-catch-all-email-account-in-postfix/
# https://tecadmin.net/install-dovecot-ubuntu-20-04/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment