I set up an Ubuntu 16.04 droplet to host my client’s website (let’s call it clientwebsite.com). I also helped him set up G Suite email hosting for his new business email (let’s call it email@example.com). In his G Suite settings, we set up a catch all so that all emails to @clientwebsite.com addresses are forwarded to firstname.lastname@example.org.
The Ubuntu server uses exim4 to send emails. I thought I configured it to send all server-related emails to me (let’s call me email@example.com). I ran
sudo dpkg-reconfigure exim4-config which resulted in a
/etc/exim4/update-exim4.conf.conf file like this:
dc_eximconfig_configtype='internet' dc_other_hostnames='clientwebsite.clientwebsite.com; clientwebsite; localhost.localdomain; localhost' dc_local_interfaces='127.0.0.1' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='' dc_mailname_in_oh='true' dc_localdelivery='mail_spool'
And I edited the
/etc/aliases file to look like this:
mailer-daemon: firstname.lastname@example.org postmaster: email@example.com nobody: firstname.lastname@example.org hostmaster: email@example.com usenet: firstname.lastname@example.org news: email@example.com webmaster: firstname.lastname@example.org www: email@example.com ftp: firstname.lastname@example.org abuse: email@example.com noc: firstname.lastname@example.org security: email@example.com root: firstname.lastname@example.org jessica: email@example.com monit: firstname.lastname@example.org
Then ran the
newaliases command and restarted exim4 with
sudo service exim4 restart.
All root emails are ending up in my client’s inbox (email@example.com), due to the catch all we set up in G Suite. I expected the server to read the
/etc/aliases file and send them to me (firstname.lastname@example.org) instead… but it seems this file is being completely ignored!
How can I make sure all server-related emails are sent to me instead of my client?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!