I’m running in to an issue with the email routing on my server.
Some clients use Google Workspace or Office365 for their email and some use the server/postfix and this causes issues when they sent email to each other from the server.
Because my website is also hosted on this server, this means the clients cannot sent email to me from the server (webmail or php/wordpress) because the server sees the domain and tries an internal delivery. When it notices there is no postfix mailbox, it returns undeliverable.
I noticed that the postfix config uses mysql queries to look for domains. Is there a way to alter these queries to make it look for domains with mailboxes instead? So it only routes to domains with existing mailboxes internally and goes external for the rest?
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
Which one do we need to change for that? virtual_mailbox_domains?