is there any way to make Postfix stop considering certain virtual domains as "local" in its delivery?
I have disabled mail services for these domains by editing the "enabled features" in Virtualmin, because the mail is handled externally by google-apps, but when trying to send mail to one of these domains from within their website, Postfix still thinks that it should deliver them locally and consequently bounces the mail since there is no user by that name.
I checked the "virtual domains" table in Webmin->Servers->Postfix, and the domains are not listed there.
This is on a Debian 4 installation that was created by running the Virtualmin GPL installation script.
mydestination is set to the name of the whole server, it doesn’t show any of the virtual domains.
> mydestination = 213-239-211-137.clients.your-server.de
relay_domains isn’t defined at all (so it defaults to mydestination)
The entire Postfix setup is as Virtualmin defined it during installation …
Where does Virtualmin store the table of virtual domains that it sets up mail services for?
<hash:/etc/postfix/virtual> seems to list only the exception mappings, and I did remove the domains that i am trying to stop Postfix from treating as local, but it still says it’s looping back to itself when trying to send mail to an address in one of these domains.
This is the domain name that Hetzner gave to the physical machine hosting Virtualmin with IP 213.239.211.137.
The domain whose mail i am trying to off-load is daimon.ch, with a different IP (78.47.27.54 - Non-default shared address)
"Mail for domain enabled?" is deactivated in the Virtualmin domain feature list, yet when a webscript sends out mail to anything@daimon.ch, Postfix tries to deliver it locally.
As a work-around, i found that I could add an entry to the transport mappings to explicitly direct outgoing mail to the google server that’s hosting mail services for daimon.ch:
But on the local BIND-DNS record, there is one line mentioning MX locally – should I try to take that out? (but it actually looks like a spam filter entry, no?):
$ttl 38400
@ IN SOA issole.info. root.issole.info. (
1210509047
10800
3600
604800
38400 )
@ IN NS issole.info.
daimon.ch. IN A 78.47.27.54
www.daimon.ch. IN A 78.47.27.54
ftp.daimon.ch. IN A 78.47.27.54
m.daimon.ch. IN A 78.47.27.54
localhost.daimon.ch. IN A 127.0.0.1 daimon.ch. IN TXT "v=spf1 a mx a:daimon.ch ip4:78.47.27.54 ?all"
ns.daimon.ch. IN A 78.47.27.54
webmail.daimon.ch. IN A 78.47.27.54
mssql.daimon.ch. IN A 78.47.27.54
lists.daimon.ch. IN CNAME daimon.ch.
That’s the SPF record, and shouldn’t be confusing Postfix. You could try removing it temporarily (but you’ll want it back, eventually, and you’ll want to add the Google outgoing servers if you use those for outgoing mail from your domain).
In the absence of the MX records, Postfix seems to somehow think that because the www ip is local, so is MX, rather than look up the MX entries in the registrar’s name server (which did already have the above definitions).