Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By walk
Having not been able to find a suitable answer in the forum yet, I thought I’d try to put a new question forward.
Email has been working for domain1.com very well on a droplet (with hostname mail.domain1.com) for a few months now. I want to move domain2.com (same droplet) off of Google Apps and into Thunderbird alongside domain1.com.
To my main.cf I’ve added:
virtual_alias_domains = domain1.com domain2.com
virtual_alias_maps = hash:/etc/postfix/virtual
mydestination = mail.domain1.com, domain1.com, localhost, localhost.localdomain
#only the last of the above line added, first three have been working fine
To the virtual file I added:
user@domain2.com user
And done ‘add user’ to ensure that user mailbox was created.
To the DNS of domain2.com I removed Google records and added:
mx 1 mail.domain1.com
Do I need to add another A record to domain2.com DNS, the same as domain1.com, which has the ‘A mail IP’ and ‘A @ IP’ records, or are they going to be picked up from domain1.com?
The DNS records have propagated in the DO control panel, but Google are still picking up email from both domains now, with none being forwarded to the server. It has only been 20 or so minutes, however. I will wait another 20 minutes before posting this to see if it has worked.
[…]
20 minutes later, it is working. Emails are still being forwarded to the Google account, but perhaps there are some servers that still need updating somewhere along the chain? Will report back in a few hours if this is still the case.
[UPDATE: Separate issue now, but it seems that emails are still being forwarded to my personal Gmail account, despite not appearing in the Google Apps account. I had the Apps account forward messages to my personal account, from where I’d ‘reply as’ the Apps address. It worked well for years, so wasn’t a problem.
But seems there’s something in the mechanism now that still thinks when I write from the Gmail account to domain1 or domain2 it should be forwarded back to itself. Mails from domain1 to domain2 are safely staying out of Gmail for now, but I’ll go into Apps and remove the forwards, see if that does it. There must be an underlying connection between Apps and Gmail making that happen - in any case this is a Google issue now, so I’ll leave it there.]
In the intervening 20 minutes I removed localhost.domain from the ‘mydestination’ line of main.cf and double checked that I had done:
postmap /etc/postfix/virtual
sudo /etc/init.d/postfix reload
To be sure I’d covered all bases. Happy to report it’s a working config.
Anyone stuck can hopefully use the above as a reference!
System