I have self hosted Mailcow at home in a VM running on my Proxmox server. Because I don’t have a public IP, I have rented a VPS on which I have Wireguard VPN and NginxProxyManager installed. I have another instance of NginxProxyManager running at home which is connected to this VPN. So if I go to foo.MY_DOMAIN for example, the NPM on VPS forwards this request to the internal VPN IP of NPM at home, then NPM at home forwards the same foo.MY_DOMAIN to the respective app/service’s local IP on my local network, this is how I access my self hosted services from outside.
Now the Mailcow VM is connected to this VPN directly and only NPM on VPS forwards my mail.MY_DOMAIN to Mailcow's internal VPN IP on port 80. To install I ran the .generate_config.sh script typed my domain as mail.MY_DOMAIN added my TZ and ran docker compose up -d, I didn’t edit anything in the mailcow.conf file.
Now when go to mail.MY_DOMAIN I can access mailcow UI and I can login. After logging in, under Email -> Configuration, I added a domain entry for MY_DOMAIN left all options as default. Then I edited the DNS for this domain and added autodiscovery, autoconfig as CNAME records and added DKIM, DMARC, SPF as TXT record and a MX record that points to mail.MY_DOMAIN.
About DNS and my domain, I have a domain say example.com, for this domain I created an A record mail pointing to the VPS public IP. I use Cloudflare for DNS, here are screenshots of how I have setup my DNS entries,



Here is the DNS configuration from mailcow Domains page,

Then I added a Mailbox I used admin as username set a password for it and left everything as default. So the email address looks like, admin@MY_DOMAIN.
Then I added an Alias,

After this I logged in to SOGo via admin@MY_DOMAIN, which worked, then I sent a email to my real GMail account, the email showed as sent in SOGo, but I have not received any mail on my GMail account.
I followed this video on YouTube BTW for help with setting up Mailcow, https://www.youtube.com/watch?v=_z6do5BSJmg
Am I missing something?