qmail and IP addresses.....
On a machine with multiple IP addresses bound to one NIC, is it possible to control which IP address qmail will use for incoming and/or outgoing SMTP connections? For POP3? steve
Re: qmail and IP addresses.....
replace the /usr/local/bin/tcpserver -v 0 smtp /var/qmail/bin/qmail-smtpd with something like this /usr/local/bin/tcpserver -v 199.111.111.111 smtp /var/qmail/bin/qmail-smtpd same with your pop3 startup file. Sean Truman www.prodigysolutions.com [EMAIL PROTECTED] - Original Message - From: Steve Wolfe <[EMAIL PROTECTED]> To: qmail list <[EMAIL PROTECTED]> Sent: Wednesday, August 16, 2000 5:44 PM Subject: qmail and IP addresses. > > >On a machine with multiple IP addresses bound to one NIC, is it possible > to control which IP address qmail will use for incoming and/or outgoing SMTP > connections? For POP3? > > steve
Re: qmail and IP addresses.....
Please read up on your programs.. tcpserver opts host port prog opts is a series of getopt-style options. host is one argument. port is one argument. prog consists of one or more arguments. tcpserver waits for connections from TCP clients. For each connection, it runs prog, with descriptor 0 reading from the network and descriptor 1 writing to the network. It also sets up several environment variables. The server's address is given by host and port. port may be a name from /etc/services or a number; if it is 0, tcpserver will choose a free TCP port. host may be 0, allowing connections to any local IP address; or a dotted-decimal IP address, allowing connections only to that address; or a host name, allowing connections to the first IP address for that host. Host names are fed through qualification using dns_ip4_qualify. - Original Message - From: Vince Vielhaber <[EMAIL PROTECTED]> To: Sean C Truman <[EMAIL PROTECTED]> Cc: Steve Wolfe <[EMAIL PROTECTED]>; qmail list <[EMAIL PROTECTED]> Sent: Wednesday, August 16, 2000 6:04 PM Subject: Re: qmail and IP addresses. > On Wed, 16 Aug 2000, Sean C Truman wrote: > > > replace the > > /usr/local/bin/tcpserver -v 0 smtp /var/qmail/bin/qmail-smtpd > > with something like this > > /usr/local/bin/tcpserver -v 199.111.111.111 smtp /var/qmail/bin/qmail-smtpd > > same with your pop3 startup file. > > That will only allow hosts with the address 199.111.111.111 to connect, > not connections to that address. To only allow connections to a > particular address you'll have to play some games using TCPREMOTEHOST. > > Vince. > -- > == > Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net > 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking > Online Campground Directoryhttp://www.camping-usa.com >Online Giftshop Superstorehttp://www.cloudninegifts.com > == > >
Re: qmail and IP addresses.....
Vince Vielhaber <[EMAIL PROTECTED]> writes: > On Wed, 16 Aug 2000, Sean C Truman wrote: > > /usr/local/bin/tcpserver -v 199.111.111.111 smtp /var/qmail/bin/qmail-smtpd > > That will only allow hosts with the address 199.111.111.111 to connect, > not connections to that address. You have that backwards. The command line will work as given above. Controlling where connections can come from is done with tcprules. paul
Re: qmail and IP addresses.....
On Wed, 16 Aug 2000, Sean C Truman wrote: > Please read up on your programs.. > > tcpserver opts host port prog > > opts is a series of getopt-style options. host is one argument. port is one > argument. prog consists of one or more arguments. > tcpserver waits for connections from TCP clients. For each connection, it > runs prog, with descriptor 0 reading from the network and descriptor 1 > writing to the network. It also sets up several environment variables. > > The server's address is given by host and port. port may be a name from > /etc/services or a number; if it is 0, tcpserver will choose a free TCP > port. host may be 0, allowing connections to any local IP address; or a > dotted-decimal IP address, allowing connections only to that address; or a > host name, allowing connections to the first IP address for that host. Host > names are fed through qualification using dns_ip4_qualify. I must have a real old man page: The server's address is given by host and port. host can be 0, allowing connections from any host; or a particular IP address... Yours says "to", mine says "from". I just tried it and I stand corrected. Vince. -- == Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking Online Campground Directoryhttp://www.camping-usa.com Online Giftshop Superstorehttp://www.cloudninegifts.com ==
Re: qmail and IP addresses.....
On Wed, 16 Aug 2000, Sean C Truman wrote: > replace the > /usr/local/bin/tcpserver -v 0 smtp /var/qmail/bin/qmail-smtpd > with something like this > /usr/local/bin/tcpserver -v 199.111.111.111 smtp /var/qmail/bin/qmail-smtpd > same with your pop3 startup file. That will only allow hosts with the address 199.111.111.111 to connect, not connections to that address. To only allow connections to a particular address you'll have to play some games using TCPREMOTEHOST. Vince. -- == Vince Vielhaber -- KA8CSHemail: [EMAIL PROTECTED]http://www.pop4.net 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking Online Campground Directoryhttp://www.camping-usa.com Online Giftshop Superstorehttp://www.cloudninegifts.com ==
RE: qmail and IP addresses.....
> > On Wed, 16 Aug 2000, Sean C Truman wrote: > > > > > replace the > > > /usr/local/bin/tcpserver -v 0 smtp /var/qmail/bin/qmail-smtpd > > > with something like this > > > /usr/local/bin/tcpserver -v 199.111.111.111 smtp > /var/qmail/bin/qmail-smtpd could I then change this to the following? /usr/local/bin/tcpserver -v 199.111.111.111 smtp /var/qmail/bin/qmail-smtpd for one instance of qmail and /usr/local/bin/tcpserver -v 199.111.111.112 smtp /var/qmail2/bin/qmail-smtpd for a second instance on the same server running w/ 2 IPs? (assuming i have a load balancer sending mail to both IPs) currently i'm using the load balancer to redirect port 25 traffic to another port for the second instance. that causes some logistics headaches that it appears the above might fix if doable. Thanks for any insight. mike. NetZero Free Internet Access and Email_ Download Now http://www.netzero.net/download/index.html Request a CDROM 1-800-333-3633 ___
Re: qmail and IP addresses.....
Steve Wolfe writes: >On a machine with multiple IP addresses bound to one NIC, is it possible > to control which IP address qmail will use for incoming and/or outgoing SMTP > connections? For POP3? Only for incoming, by handing the IP address to tcpserver. It could be done for outgoing, but nobody has written such a patch. For what it's worth, Dan Bernstein says that it's frivolous. -- -russ nelson <[EMAIL PROTECTED]> http://russnelson.com | If you think Crynwr sells support for free software | PGPok | health care is expensive now 521 Pleasant Valley Rd. | +1 315 268 1925 voice | now, wait until you see Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | what it costs when it's free.
Re: qmail and IP addresses.....
On Sat, Aug 19, 2000 at 11:57:47PM -0400, Russell Nelson wrote: > It could be done for outgoing, but nobody has written such a patch. http://www.qmail.org/outgoingip.patch ? :) > For what it's worth, Dan Bernstein says that it's frivolous. FWIW, I disagree :) Regards, james -- James Raftery (JBR54) - Programmer Hostmaster - IE TLD Hostmaster IE Domain Registry - www.domainregistry.ie - (+353 1) 706 2375 "Managing 4000 customer domains with BIND has been a lot like herding cats." - Mike Batchelor, on [EMAIL PROTECTED]
Re: qmail and IP addresses.....
On Sat, 19 Aug 2000, Russell Nelson wrote: > It could be done for outgoing, but nobody has written such a patch. Chuck Foster DID write such a patch 2.5 years ago. (If you want a version that works with 1.03 and you cannot find any, ask me.) > For what it's worth, Dan Bernstein says that it's frivolous. Yes. He also put this comment into his own code: /* XXX: could bind s */ --Pavel Kankovsky aka Peak [ Boycott Microsoft--http://www.vcnet.com/bms ] "Resistance is futile. Open your source code and prepare for assimilation."
Re: qmail and IP addresses.....
At 23:22 21.08.00 +0200, you wrote: >On Sat, 19 Aug 2000, Russell Nelson wrote: > >> It could be done for outgoing, but nobody has written such a patch. > >Chuck Foster DID write such a patch 2.5 years ago. (If you want a version >that works with 1.03 and you cannot find any, ask me.) Based on patches "local-bind" patch by Chuck Foster <[EMAIL PROTECTED]> "relayfrom" patch by Chris Johnson <[EMAIL PROTECTED]> I have written a new one called "bindlocal-senderrelating". Depending on the "from:" address in an e-mail qmail-remote is binding to defined IP addresses on a multi-IP host. Name of control file: control/bindlocalip Contents: domainA:IP address 1 .domainA:IP address 1 domainB:IP address 2 i.e. bieringer.de:192.168.2.51 .bieringer.de:192.168.2.51 test.com:192.168.2.62 .test.com:192.168.2.62 It is available at: http://www.bieringer.de/linux/qmail/bindlocal-senderrelating-qmail-1.03+patc hes-12.diff Hope this helps, Peter