![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
multiple ip's on one machine and sendmail
Ok, I'm totally beat. I've been trying and searching for answers all
day, but I couldn't solve my problem, so I hlpe one of you can help me. I'm runing RH-9 with kernel 2.4.20. Here is the situation and what I want to do. I have to ip's, both have a host name: xxx.com and mail.xxx.com, respectively. I have only one machine with two ethernet interfaces. What I want to achieve are as follows: 1) I want the two interfaces to connect to the gateway using the two different ip's. 2) I want sendmail to listen to the interface associated with the mail.xxx.com domain and also uses that address when it relay outbound mails. 3) and I wnat all other traffic, inbound and outbound, to go through the interface associate with the xxx.com address. How can I achieve this or is it possible? Help and thank a bunch! Biron |
|
|||
|
Re: multiple ip's on one machine and sendmail
On Mar 3, 1:43 pm, birch...@gmail.com wrote:
> I have to ip's, both have a host name: xxx.com and mail.xxx.com, > respectively. I have only one machine with two ethernet interfaces. Are those two IPs on the same network or not? > What I want to achieve are as follows: > > 1) I want the two interfaces to connect to the gateway using the two > different ip's. That will work just fine if the two IPs are on different networks. > 2) I want sendmail to listen to the interface associated with the > mail.xxx.com domain and also uses that address when it relay outbound > mails. When you say "use that address", do you really mean to use that address or to send packets out that interface? These two are not the same thing. > 3) and I wnat all other traffic, inbound and outbound, to go through > the interface associate with the xxx.com address. > How can I achieve this or is it possible? > Help and thank a bunch! Your requirements don't make sense. What is your outer problem? Why do you want these things? It is quite likely that what you actually need is better achieved some other way. You seem to be confusing IP addresses with interfaces. In general, inbound packets will have whatever address the other machine chose to use. You can't control that. Outbound packets will have whatever address the other end chose if they are replies or whatever is closest if not. The outbound interface chosen will be the one closest to the destination. The source address has no affect on the interface chosen, nor is there any rational reason why it should. The inbound interface chosen will be the one the other end knows how to get to. The destination address has no affect on the interface chosen, nor is there any rational reason why it should (as far as the end system is concerned). Addresses that fall inside the same network due to the chosen netmask must be on the same physical network. Two interfaces on the same physical network must be bridged or teamed. You can break these rules, but you need to know exactly what you're doing and it's rarely the right thing to do. DS |
|
|||
|
Re: multiple ip's on one machine and sendmail
> From: David Schwartz <davids@webmaster.com>
> Reply to: David Schwartz > Date: Mon, 3 Mar 2008 16:25:28 -0800 (PST) > >On Mar 3, 1:43 pm, birch...@gmail.com wrote: > >> What I want to achieve are as follows: >> >> 1) I want the two interfaces to connect to the gateway using the two >> different ip's. > >That will work just fine if the two IPs are on different networks. > Well, the two ip's are on the same network. I meant to type "connect to the _same_ gateway, but I missed it. >> 2) I want sendmail to listen to the interface associated with the >> mail.xxx.com domain and also uses that address when it relay outbound >> mails. > >When you say "use that address", do you really mean to use that >address or to send packets out that interface? These two are not the >same thing. > Ok, I'm not too good at these terminologies, so let me explain what I desire. When people try to connect to my smtp server, they look up the address from the mx record, so there isn't much of an issue. What I really want is when I send outgoing mails, say I send an email to your machine, it would appear the connection is made from mail.xxx.com and its associated ip address and NOT from xxx.com and its associated ip address. >> 3) and I wnat all other traffic, inbound and outbound, to go through >> the interface associate with the xxx.com address. > >> How can I achieve this or is it possible? >> Help and thank a bunch! > >Your requirements don't make sense. What is your outer problem? Why do >you want these things? It is quite likely that what you actually need >is better achieved some other way. Because I want mail.xxx.com and its ip address dedicated to the mail server only, and I want other traffic, whether it is a inbound request to my web server or my outbound telnet connection, etc., to appear to be made from xxx.com and its associated address. Does that make sense now? So is this doable? Thanks! Biron |
|
|||
|
Re: multiple ip's on one machine and sendmail
<birch69x@gmail.com> wrote in message news:fqia37$c9e$1@netnews.hinet.net...
> > From: David Schwartz <davids@webmaster.com> > > Reply to: David Schwartz > > Date: Mon, 3 Mar 2008 16:25:28 -0800 (PST) > > > >On Mar 3, 1:43 pm, birch...@gmail.com wrote: > > > >> What I want to achieve are as follows: > >> > >> 1) I want the two interfaces to connect to the gateway using the two > >> different ip's. > > > >That will work just fine if the two IPs are on different networks. > > > > Well, the two ip's are on the same network. I meant to type "connect to > the _same_ gateway, but I missed it. > > >> 2) I want sendmail to listen to the interface associated with the > >> mail.xxx.com domain and also uses that address when it relay outbound > >> mails. > > > >When you say "use that address", do you really mean to use that > >address or to send packets out that interface? These two are not the > >same thing. > > > > Ok, I'm not too good at these terminologies, so let me explain what I > desire. When people try to connect to my smtp server, they look up the > address from the mx record, so there isn't much of an issue. What I > really want is when I send outgoing mails, say I send an email to your > machine, it would appear the connection is made from mail.xxx.com and its > associated ip address and NOT from xxx.com and its associated ip address. > > >> 3) and I wnat all other traffic, inbound and outbound, to go through > >> the interface associate with the xxx.com address. > > > >> How can I achieve this or is it possible? > >> Help and thank a bunch! > > > >Your requirements don't make sense. What is your outer problem? Why do > >you want these things? It is quite likely that what you actually need > >is better achieved some other way. > > Because I want mail.xxx.com and its ip address dedicated to the mail > server only, and I want other traffic, whether it is a inbound request to > my web server or my outbound telnet connection, etc., to appear to be made > from xxx.com and its associated address. Does that make sense now? > > So is this doable? Thanks! Sendmail M4 configuration option: DAEMON_OPTIONS(`... Modifier=b'). This would have been better asked on comp.mail.sendmail. |
|
|||
|
Re: multiple ip's on one machine and sendmail
> >On Mar 3, 1:43 pm, birch...@gmail.com wrote:
> > >> What I want to achieve are as follows: > > >> 1) I want the two interfaces to connect to the gateway using the two > >> different ip's. > > >That will work just fine if the two IPs are on different networks. > Well, the two ip's are on the same network. I meant to type "connect to > the _same_ gateway, but I missed it. So you have two interfaces to the same network. Are you bridging or teaming? If not, stop. What you're doing already doesn't make sense. > >> 2) I want sendmail to listen to the interface associated with the > >> mail.xxx.com domain and also uses that address when it relay outbound > >> mails. > > >When you say "use that address", do you really mean to use that > >address or to send packets out that interface? These two are not the > >same thing. > Ok, I'm not too good at these terminologies, so let me explain what I > desire. When people try to connect to my smtp server, they look up the > address from the mx record, so there isn't much of an issue. What I > really want is when I send outgoing mails, say I send an email to your > machine, it would appear the connection is made from mail.xxx.com and its > associated ip address and NOT from xxx.com and its associated ip address. Ah, so this has nothing to do with interfaces it all. You simply want sendmail to bind to a particular source address when it makes outgoing connections. Google "ClientPortOptions" and the "Addr" sub-option. > >> 3) and I wnat all other traffic, inbound and outbound, to go through > >> the interface associate with the xxx.com address. > > >> How can I achieve this or is it possible? > >> Help and thank a bunch! > > >Your requirements don't make sense. What is your outer problem? Why do > >you want these things? It is quite likely that what you actually need > >is better achieved some other way. > Because I want mail.xxx.com and its ip address dedicated to the mail > server only, and I want other traffic, whether it is a inbound request to > my web server or my outbound telnet connection, etc., to appear to be made > from xxx.com and its associated address. Does that make sense now? I think so. Make sure the IP address for xxx.com is primary for the interface to the network (physical or virtual, whichever one routes to the network). Add mail.xxx.com as an alias to that network interface. Configure sendmail to use the mail.xxx.com as its client port's bind address. Put the mail name in your MX record. That should do it. DS |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|