View previous topic :: View next topic |
Author |
Message |
d0wn_under Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/BaldursGate/baldursgate_tiax.gif)
Joined: 13 Mar 2003 Posts: 300 Location: Sheffield, England
|
Posted: Tue Dec 07, 2004 4:35 pm Post subject: postfix and internal domains |
|
|
I've installed postfix and am trying to get my internal and external domains setup correctly.
My current config is:
myhostname = myserver.mynetwork.int # not valid internet tld
mydomain = mynetwork.int
myorigin = mydomain.co.uk # valid tld
I need it like this so that the mail relay on my isp will forward mail for me. If I have the following
myhostname = myserver.mynetwork.int # not valid internet tld
mydomain = mynetwork.int
myorigin = mynetwork.int
I get mail rejected from my isp with a 505 error.
The problem I am having is that I want my internal mail to be on the domain mynetwork.int not on mydomain.co.uk. The first option gives me what I want, the second option allows me to send email to the outside world.
Can anyone suggest how to configure postfix so that to my isp I am coming from mydomain.co.uk but internal mail is from mynetwork.int?
Also, just to make it slightly more awkward I have two external domains, is there anyway that I can get it to choose which one it uses when it sends via the potentially 2 different mail relays?
Ta
ps before any smart arse jumps in, I know that you can route any tld you want over the internet as long as both parties have dns configured correctly. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d_m Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/12935044173ee8a97e45c37.png)
Joined: 12 Jun 2003 Posts: 570 Location: Philadelphia, PA, USA
|
Posted: Tue Dec 07, 2004 6:22 pm Post subject: |
|
|
I have done something like this before. The trick is to use rewriting rules to rewrite outgoing mail to have the "co.uk", and to strip "co.uk" from incoming mail.
I will need to refresh my memory about which options exactly to set, but if you read the documentation around "recipient_canonical_maps" that might get you started. I'll post something more once I"m pretty sure I know what you need.
Good luck.
[ EDIT: I have found http://www.postfix.org to be a good resource for documentation, etc. ] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d0wn_under Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/BaldursGate/baldursgate_tiax.gif)
Joined: 13 Mar 2003 Posts: 300 Location: Sheffield, England
|
Posted: Tue Dec 07, 2004 10:47 pm Post subject: |
|
|
I've looked through the postfix site but as I didn't know what I was looking for I didn't know where to look.
I'll have a look at the maps.
As a side question, is it unusual to have an internal domain with a non externally valid tld and to send mail to that accounts on that domain? I asked on the postfix mailing list and got an answer which seemed to apply that it was unusual. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
d_m Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/12935044173ee8a97e45c37.png)
Joined: 12 Jun 2003 Posts: 570 Location: Philadelphia, PA, USA
|
Posted: Tue Dec 07, 2004 11:35 pm Post subject: |
|
|
Yeah, it is unusual. In general, you'd like mail in a user's mailbox to have addresses with externally valid tlds. If one of your users moves their mailbox to a different server, and then tries replying to an old message then stuff will break.
A better option, if you want to have many different mail servers locally which don't have public ip addresses, would be to have a sub-domain in dns called internal or something. Then, you can have user@blah.internal.domain.com, and user@foo.bar.internal.domain.com, or whatever, and those will all get delivered where you want. However, you know that if someone uses a random SMTP server, all those mails will first go to the mailhost for domain.com (as listed in domain.com's mx records), which can then decide the best course of action.
Incidentally, the best way to set up something like internal.domain.com is with a split dns setup (a dns server only accepting internal queries, and another which is authoritative and accepts external queries) so that the world doesn't see all your A records for 192.168.*.* addresses; those are considered very sloppy. :P |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|