Found this googling the same problem, and couldn’t find a good rundown of the problem elsewhere. Apparently this bug still exists 5 months later.
To build on ralf’s answer in the other thread, the problem was that the aliases file didn’t exist and also that it was trying to deliver mail locally for the host’s domain due to default settings.
To fix it first log into the postfix shell:
ee shell mywebsite.com --service=postfix
Then create the /etc/aliases file:
cd /etc
cat > aliases
[Ctrl + D]
And run:
postalias /etc/aliases
newaliases
(re: https://serverfault.com/questions/683243/postfix-aliases-db-no-such-file-or-directory)
Then edit /etc/postfix/main.cf:
nano /etc/postfix/main.cf
Update this setting to remove your own domain:
mydestination = localhost
And comment out these if they exist:
#virtual_mailbox_domains =
#virtual_alias_maps =
#virtual_mailbox_maps =
(re: https://www.digitalocean.com/community/questions/postfix-won-t-send-to-external-server-with-same-domain-name)
Last, exit the shell:
exit
And restart postfix’s container:
docker ps
[find postfix's container name]
docker restart postfix_container_name
I don’t really know if all this is necessary because I don’t know much about postfix, but it seems to be working now so ¯_(ツ)_/¯