ddavness / power-mailinabox

A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!
Creative Commons Zero v1.0 Universal
168 stars 31 forks source link

feature - local delivery disabled for certain mailboxes #99

Open stevetoza opened 1 year ago

stevetoza commented 1 year ago

Hi I was wondering if local delivery could be disabled for certain mailboxes.

The use case for this would be, I have some wordpress sites to connect to the box to send email, DNS is external and the MX record points to say gmail, wordpress connects to the box using wordpress@domain.com but the email is to be sent to bob@domain.com which doesn't exist on the box as email is hosted on gmail.

This looks fairly simple by amending the query in

/etc/postfix/virtual-mailbox-domains.cf
adding the below to the end of the query 

AND source NOT LIKE '%%@domain.com'

With an Ui update next to the domain to disable local delivery

Thanks in advance