Postfix and Sender Dependant IP

Hey all

I have a server running CentOS 6.3, Virtualmin 3.98 GPL and Webmin 1.620 GPL. Postfix 2.9.6 is installed and all is running smoothly.

I’ve fllowed the guide here: http://www.virtualmin.com/documentation/email/dependent to configure sender dependant IP mapping so that emails originate from the domain’s IP rather than default. This works absolutely fine, I just wondered if there was a way to make this the default option for newly created domains?

Also, to make this task a little more complicated, mail isn’t handled locally on this server - it’s handled by a combination of Google Apps, Outlook.com and external (unrelated) MS Exchange systems. So, as a result I’ve disabled the Mail for domain enabled? option for all virtual servers and this removes the menu entry at Server Configuration > Email Settings.

I noticed on the page linked above, that there’s an API call to set modify-mail with the –outgoing-ip flag. Can I use this API to force this option to be enabled once the virtual server is created?

Any ideas would be greatly appreciated.

Apologies, I got my OS wrong…

I have a CentOS host system, then using Cloudmin for KVM I have an Ubuntu 12.04 guest OS on which Virtualmin runs.

Can anyone give me any advice on how I can achieve the Sender Dependant IP config for all domains, whilst not having Mail for Domain enabled please? (ie it’s used only for sendmail or mail() scripts, notfor mail clients etc)