I’ve just moved a new domain (newboston.net) over to Digital Ocean, creating the A records and then updating the registrar (godaddy.com) of the change. After a few minutes, nslookup and dig confirm that the change has propagated. Checking the apache logs, I’ve also confirmed that web pages are now being served from Digital Ocean. So far so good.
Now to forward email sent to a few newboston.net addresses. This is currently handled by my current ISP, but I’d like to do this through DigitalOcean. I added a new A record for mail, as well as an MX record, and then updated /etc/postfix/main.cf to include the new domain under virtual_alias_domains, and a pair of new email aliases in /etc/postfix/virtual. I ran “newaliases”, reloaded and restarted postfix, but I’m still getting an error when sending an email to “email@example.com”:
Delivery to the following recipient failed permanently:
The error that the other server returned was: 550 5.1.1 firstname.lastname@example.org: Recipient address rejected: User unknown in virtual alias table
Is there something wrong with the way I’ve set up the alias?
Here is the contents of /etc/postfix/virtual. I can confirm that email@example.com is forwarding correctly.
root@pescadero:/etc/postfix# cat virtual firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
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 $100 of credit to try our products over 60 days!