Skip to content

Instantly share code, notes, and snippets.

@sh4dowb
Created January 15, 2022 19:32
Show Gist options
  • Save sh4dowb/c034b9effbfd49f998536206b30a6801 to your computer and use it in GitHub Desktop.
Save sh4dowb/c034b9effbfd49f998536206b30a6801 to your computer and use it in GitHub Desktop.
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