Welcome, Guest
Please Login or Register.
Lost Password?
Make Postfix stop considering domains as local (1 viewing)
Post Reply

TOPIC: Make Postfix stop considering domains as local

#14752
Joncas (User)
Posts: 6
graphgraph
Make Postfix stop considering domains as local 2008/07/14 08:51  
Hello!

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.
  The administrator has disabled public write access.
#14760
Joe (Admin)
Posts: 3798
graph
Re:Make Postfix stop considering domains as local 2008/07/14 10:18  
Check mydestination. It probably contains the offending hostname, or a variable that contains that name.
  The administrator has disabled public write access.
#14761
Joe (Admin)
Posts: 3798
graph
Re:Make Postfix stop considering domains as local 2008/07/14 10:18  
Oh, yeah, and relay_domains.
  The administrator has disabled public write access.
#14779
Joncas (User)
Posts: 6
graphgraph
Re:Make Postfix stop considering domains as local 2008/07/14 22:10  
Many thanks for your suggestions!

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.
  The administrator has disabled public write access.
#14781
Joe (Admin)
Posts: 3798
graph
Re:Make Postfix stop considering domains as local 2008/07/14 22:18  
Where does Virtualmin store the table of virtual domains that it sets up mail services for?

/etc/postfix/virtual

It sounds like your systems hostname is actually the domain you're trying to send elsewhere, and you just don't realize it. ;-)

Postfix gets this from a gethostbyname call, and not from the various hostname configuration files. What do you get when you run:

hostname -f

?
  The administrator has disabled public write access.
#14782
Joncas (User)
Posts: 6
graphgraph
Re:Make Postfix stop considering domains as local 2008/07/14 22:36  
hostname -f gives:
213-239-211-137.clients.your-server.de

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.
  The administrator has disabled public write access.
#14783
Joe (Admin)
Posts: 3798
graph
Re:Make Postfix stop considering domains as local 2008/07/14 23:13  
That's really strange. But I guess you know that already. ;-)

Does grep find that domain anywhere in /etc/postfix?

e.g.:

cd /etc/postfix
grep -R daimon.ch *
  The administrator has disabled public write access.
#14784
Joncas (User)
Posts: 6
graphgraph
Re:Make Postfix stop considering domains as local 2008/07/14 23:20  
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:

transport:daimon.ch smtp:gmail-smtp-in.l.google.com


That's the only line that grep found in etc/postfix

This way, I do manage to get the mail out, but I was hoping I could just get Postfix to ignore any special handling and treat this a non-local domain.

But don't waste your time any more on this, I really appreciate your efforts !
  The administrator has disabled public write access.
#14786
Joe (Admin)
Posts: 3798
graph
Re:Make Postfix stop considering domains as local 2008/07/15 01:32  
How about the MX record? (Can you tell I'm bothered by not being able to figure this out?) ;-)
  The administrator has disabled public write access.
#14788
Joncas (User)
Posts: 6
graphgraph
Re:Make Postfix stop considering domains as local 2008/07/15 03:50  
Yes, it is very nagging not to know the reason!

At the level of the public domain name server, the two MX entries point to the google-server:
MX1 aspmx.l.google.com
MX2 alt1.aspmx.l.google.com


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.
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.