Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

postfix: smarthost/relayhost for particular domain?

 
   Soft32 Home -> Linux2 Arch -> Networking RSS
Next:  Comqaq AXL200 PCI Accelerator Card on Linux box  
Author Message
Jem Berkes

External


Since: Oct 17, 2003
Posts: 81



(Msg. 1) Posted: Tue Oct 21, 2003 1:44 pm
Post subject: postfix: smarthost/relayhost for particular domain?
Archived from groups: comp>os>linux>networking, others (more info?)

I run my own mail servers, and outgoing mail is working fine for all
domains except (ironically) for when sending to my own ISP's email
addresses. Their MX doesn't accept incoming TCP connections from my host,
and I have no clue why.

While their domain's MX doesn't accept my connections, there are other
hosts that will; for instance, the SMTP server address that customers are
supposed to use. I was going to enable postfix's relayhost feature (like
sendmail smarthost) but this would send ALL outgoing mail through
smtp.myisp

However I really only want to resort to this type of mail delivery when the
recipient is at that particular ISP, since this is the only domain that
causes problems. Is there a way to make relahost= work for only a certain
recipient domain?

--
Jem Berkes
http://www.sysdesign.ca/
Back to top
Login to vote
Jem Berkes

External


Since: Oct 17, 2003
Posts: 81



(Msg. 2) Posted: Tue Oct 21, 2003 10:43 pm
Post subject: Re: postfix: smarthost/relayhost for particular domain? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> While their domain's MX doesn't accept my connections, there are other
> hosts that will; for instance, the SMTP server address that customers
> are supposed to use. I was going to enable postfix's relayhost feature
> (like sendmail smarthost) but this would send ALL outgoing mail
> through smtp.myisp

I have found the solution (postfix is awesome!). To help out anyone who
wants to do something similar, relaying mail bound to specific addresses or
domains through a specific mail relay, here is what you do:

1. Edit /etc/postfix/transport. Here is what I added:
mts.net smtp:[smtp.mts.net]

This means: when the destination is @mts.net, send mail through
relay host smtp.mts.net. The host name is in brackets to disable MX
lookup; my intent is to use exactly that specified mail relay to
solve a quirky connectivity problem I have to the proper MX.

2. Run 'postmap /etc/postfix/transport' to update the db (mine is hash)

3. In /etc/postfix/main.cf, enable transport_maps
transport_maps = hash:/etc/postfix/transport

In my case the map is a hash file, adjust as necessary. For more detail see
'man transport' for the syntax of the transport mappings. This is a very
powerful feature!

--
Jem Berkes
http://www.sysdesign.ca/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
mail server behind router port forwarding 25 domain static.. - i have static ip domain port forwarded on my router to my server http shttp ssl webmin vmware virtual server joomla..

Domain question. - Group, I am looking for some advice as I am not sure what to serach for in google on what I want to do. Say I have a....

2 domain with 1 static ip - Hi I have 2 domain names and 1 static ip, how can i forward all the packets from domain name A to computer A and all...

Problems creating domain for intranet - I am new to linux and trying to setup apache server. i was succesful in configuring apache and the apche server is..

Telnet equivalent to Unix domain socket? - Hi, All, I'm making a server using unix domain socket. Is there telnet equivalent tool that I can easily use as a..

Sniff local IPC via Unix Domain Socket - Hello All, I'm looking around if IPC sniffing via local UDS is possible. I've got two processes talking to each other....
       Soft32 Home -> Linux2 Arch -> Networking All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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

Categories:
 Windows
 Linux
 Mac
 PDA



[ Contact us | Terms of Service/Privacy Policy ]