Re: [SLUG] multiple POP-3 servers on one machine
> > > Then what does apache virtual hosting do? > > > > It looks at the HTTP "Host:" header in the request. > > Unless you are doing IP address based virtual hosting, which is what I am > using. which is now trying to be phased out... recently ARIN stopped handing out IPs for virtual hosting, i think APNIC and RIPE have or will have similar policies... the protocol spec for HTTP 1.0 did not include the Host: part of the request and hence the inability to resolve multiple hostnames on a single IP... hence the spec for HTTP 1.1 includes the Host: part so that your httpd can determine which website the user is after without wasting multiple IPs on a single machine... problem is that there are still some people out there who are using browsers that are only HTTP 1.0 compliant... the most common workaround seems to be host each domain as a subdirectory of itself... eg rather then the root of someone's site being at www.some_name.com/ it would be at www.some_name.com/some_name/ HTH marty "I can't buy what I want because it's free. Can't be what they want because I'm me." - Corduroy, Pearl Jam -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
Certainly sounds better than my theory, that's for sure. :) > Nah. > > For each Listen ip:port as configured in httpd.conf, > the parent Apache process bind()s a socket to that ip and port > and hangs a listen() on it. As many as you have specified. > > Whenever a request comes in on a it is farmed off to > a child task to process, and another bind()/listen() is done > to listen for the next incoming request on THAT IP AND PORT. > > If you've done any pre-forking/multi-ip-port server code, the above > methodology will be familiar. For those who want to learn more, > there are some excellenet chapters on this very topic in > "The Perl Cookbook", towards the end of the book. > > So all I really want is a preforking multi-IP highly configurable > POP-3 server that functions basically the same way that Apache > does. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Tue, 31 Oct 2000, Umar Goldeli wrote: > > Unless you are doing IP address based virtual hosting, which is what I am > > using. > > In which case I can't tell you *exactly* what apache does - but I can give > you a feasible method.. :) > > Basically in terms of a threaded application, you can always get one > process to bind to port 80 and listen. Everytime a request comes in to > that particular port (since there is only one port, regardless of the IP > it will go to that port anyhow) the process can look at the connection > struct which will include (amongst other things) source port, dest port, > source ip, dest ip for that that particular stream.. it would then be a > trivial task for the process to serve the appropriate site based on the > dst ip. Nah. For each Listen ip:port as configured in httpd.conf, the parent Apache process bind()s a socket to that ip and port and hangs a listen() on it. As many as you have specified. Whenever a request comes in on a it is farmed off to a child task to process, and another bind()/listen() is done to listen for the next incoming request on THAT IP AND PORT. If you've done any pre-forking/multi-ip-port server code, the above methodology will be familiar. For those who want to learn more, there are some excellenet chapters on this very topic in "The Perl Cookbook", towards the end of the book. So all I really want is a preforking multi-IP highly configurable POP-3 server that functions basically the same way that Apache does. -- Rick Welykochy || Praxis Services -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
> Unless you are doing IP address based virtual hosting, which is what I am > using. In which case I can't tell you *exactly* what apache does - but I can give you a feasible method.. :) Basically in terms of a threaded application, you can always get one process to bind to port 80 and listen. Everytime a request comes in to that particular port (since there is only one port, regardless of the IP it will go to that port anyhow) the process can look at the connection struct which will include (amongst other things) source port, dest port, source ip, dest ip for that that particular stream.. it would then be a trivial task for the process to serve the appropriate site based on the dst ip. //umar. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Tue, 31 Oct 2000, Umar Goldeli wrote: > > Then what does apache virtual hosting do? > > It looks at the HTTP "Host:" header in the request. Unless you are doing IP address based virtual hosting, which is what I am using. Mikal -- Michael Still ([EMAIL PROTECTED]) - Panda PDF Generation Library (http://www.stillhq.com/panda/) - GPG Public Key at http://www.stillhq.com/mikal.asc -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
> Then what does apache virtual hosting do? It looks at the HTTP "Host:" header in the request. //umar. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Tue, 31 Oct 2000, Michael Still generated: >Then what does apache virtual hosting do? AFAIK, the request to the webserver contains the fqdn of the host that the client thinks it is accessing, so the webserver knows which set of pages to feed. -- Sure, I subscribe to USENET, but I only get it for the articles. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, 30 Oct 2000, Conrad Parker wrote: > > On Mon, Oct 30, 2000 at 10:56:30AM +1100, Rick Welykochy wrote: > > A question from someone not on the list: > > > > Is it possible to run two (or more) 'virtual' POP-3 servers > > on the one Linux box, each listening on its own IP, on the standaard > > POP-3 port. > > TCP services listen to a TCP port; there is only one "instance" of > TCP on a system, so you can't have two daemons each listening on "its > own IP" but on the same port. There is only one port 110 on the system > as far as TCP is concerned (and similarly, there is a port 110 for UDP). > A really good tutorial on this is RFC 1180 (eg. http://RF.Cx/rfc1180.html). Then what does apache virtual hosting do? Mikal -- Michael Still ([EMAIL PROTECTED]) - Panda PDF Generation Library (http://www.stillhq.com/panda/) - GPG Public Key at http://www.stillhq.com/mikal.asc -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, Oct 30, 2000 at 01:36:33PM +1100, Rick Welykochy wrote: > > How does Apache allow ten web server on different IP's > all to listen on port 80? Answer: you bind to specific > IP addresses instead of 0.0.0.0 > > Is there a similar mechanism for POP-3? as penance, I trawled freshmeat. The following POP servers support virtual hosting: POPular http://www.remote.org/jochen/mail/popular/ -- a POP3 server designed for large systems, includes virtual server support Solid POP3 http://freshmeat.net/projects/solidpop3/homepage/ -- claims virtual hosting support, actual site was down when I checked Teapop http://www.toontown.org/teapop/ -- supports virtual domains with multiple IPs, and optional authentication via SQL and htpasswd etc. VMailMgr http://www.vmailmgr.org/ -- "A password checking interface between qmail-popup and qmail-pop3d which replaces the usual checkpassword, as well as an authentication module for Courier IMAP" vpopmail http://www.inter7.com/vpopmail/ -- another qmail add-on the following do name based virtual hosting, but not multiple IPs: Virtual eMail (patch for gnu-pop3d) http://www.reedmedia.net/projects/virtualmail/ vmail-sql http://www.ex-parrot.com/~chris/vmail-sql/ vpopd http://gtkgo.netpedia.net/index6.html hope that helps, Conrad. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
Yeah you would need to use tcp wrappers instead of inetd Conrad Parker wrote: > > On Mon, Oct 30, 2000 at 01:45:03PM +1100, John Ferlito wrote: > > > > I'd like to disagree. When you bind a socket you bind to both an > > IP address and a port. So you can have two programs listening to the > > same port on differnet ip addresses. > > yeah, you and John are right. I've been caught out, pants off, > having left my copy of Stevens at home. > > Hmm, now to drag myself out of this mess ... and to get the inetd > monkey off my back ... > > Conrad. > > -- > SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ > More Info: http://slug.org.au/lists/listinfo/slug -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, Oct 30, 2000 at 01:45:03PM +1100, John Ferlito wrote: > > I'd like to disagree. When you bind a socket you bind to both an > IP address and a port. So you can have two programs listening to the > same port on differnet ip addresses. yeah, you and John are right. I've been caught out, pants off, having left my copy of Stevens at home. Hmm, now to drag myself out of this mess ... and to get the inetd monkey off my back ... Conrad. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, 30 Oct 2000, John Ferlito wrote: > On Mon, Oct 30, 2000 at 01:27:48PM +1100, Conrad Parker wrote: > > TCP services listen to a TCP port; there is only one "instance" of > > TCP on a system, so you can't have two daemons each listening on "its > > own IP" but on the same port. There is only one port 110 on the system > > as far as TCP is concerned (and similarly, there is a port 110 for UDP). > > A really good tutorial on this is RFC 1180 (eg. http://RF.Cx/rfc1180.html). > > I'd like to disagree. When you bind a socket you bind to both an > IP address and a port. So you can have two programs listening to the > same port on differnet ip addresses. Sadly, misinformation on lists gets archived, then indexed by google or some other mechanism and then thousands of newbies are misinformed during the uptake of their learning curve. -- Rick Welykochy || Praxis Services -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, Oct 30, 2000 at 01:27:48PM +1100, Conrad Parker wrote: > > On Mon, Oct 30, 2000 at 10:56:30AM +1100, Rick Welykochy wrote: > > A question from someone not on the list: > > > > Is it possible to run two (or more) 'virtual' POP-3 servers > > on the one Linux box, each listening on its own IP, on the standaard > > POP-3 port. > > TCP services listen to a TCP port; there is only one "instance" of > TCP on a system, so you can't have two daemons each listening on "its > own IP" but on the same port. There is only one port 110 on the system > as far as TCP is concerned (and similarly, there is a port 110 for UDP). > A really good tutorial on this is RFC 1180 (eg. http://RF.Cx/rfc1180.html). I'd like to disagree. When you bind a socket you bind to both an IP address and a port. So you can have two programs listening to the same port on differnet ip addresses. eg I'm using a program called simpleproxy which just proxies tcp connections. I run it twice with two seperate config files as such Config 1: LocalHost 203.62.148.33:8080 RemoteHost proxy.pacific.net.au:8080 Config 2: LocalHost 203.62.148.34:8080 RemoteHost melbourne.cache.telstra.net:3128 my ifconfig looks like this eth0 Link encap:Ethernet HWaddr 00:A0:CC:58:83:27 inet addr:203.62.148.33 Bcast:203.62.148.47 eth0:0Link encap:Ethernet HWaddr 00:A0:CC:58:83:27 inet addr:203.62.148.34 Bcast:203.62.148.47 so If i do telnet 203.62.148.33 8080 i get the telstra proxy and telnet 203.62.148.34 8080 gives me the PI proxy same box, same port, differnt IP. Definetly possible and very useful. -- John The difference between a good man and a bad one is the choice of cause - William James -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, 30 Oct 2000, Conrad Parker wrote: > > On Mon, Oct 30, 2000 at 10:56:30AM +1100, Rick Welykochy wrote: > > A question from someone not on the list: > > > > Is it possible to run two (or more) 'virtual' POP-3 servers > > on the one Linux box, each listening on its own IP, on the standaard > > POP-3 port. > > TCP services listen to a TCP port; there is only one "instance" of > TCP on a system, so you can't have two daemons each listening on "its > own IP" but on the same port. There is only one port 110 on the system > as far as TCP is concerned (and similarly, there is a port 110 for UDP). > A really good tutorial on this is RFC 1180 (eg. http://RF.Cx/rfc1180.html). Hmmm ... not exactemente ... you can only listne to one IP/port combo. If the IP is 0.0.0.0, you are listening to all IPs. How does Apache allow ten web server on different IP's all to listen on port 80? Answer: you bind to specific IP addresses instead of 0.0.0.0 Is there a similar mechanism for POP-3? -- Rick Welykochy || Praxis Services -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
> On Mon, Oct 30, 2000 at 10:56:30AM +1100, Rick Welykochy wrote: > A question from someone not on the list: > > Is it possible to run two (or more) 'virtual' POP-3 servers > on the one Linux box, each listening on its own IP, on the standaard > POP-3 port. TCP services listen to a TCP port; there is only one "instance" of TCP on a system, so you can't have two daemons each listening on "its own IP" but on the same port. There is only one port 110 on the system as far as TCP is concerned (and similarly, there is a port 110 for UDP). A really good tutorial on this is RFC 1180 (eg. http://RF.Cx/rfc1180.html). So, you can either set up the system's IP layer (through ipchains etc) to redirect connections destined for particular ports on particular IP addresses to different ports, and then put a POP server on each of those ports, or you can set up a single POP server that listens on the port but acts differently based on the destination IP address of its connections: On Mon, Oct 30, 2000 at 11:12:52AM +1100, John Ferlito wrote: > definetly possible. You just need to find a POP daemon to > support it. I just checked cucipop and it doesn't look like it does. perhaps try perdition (a POP proxy): http://vergenet.net/linux/perdition/ Horms: can perdition do this? Conrad. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] multiple POP-3 servers on one machine
On Mon, Oct 30, 2000 at 10:56:30AM +1100, Rick Welykochy wrote: > A question from someone not on the list: > > Is it possible to run two (or more) 'virtual' POP-3 servers > on the one Linux box, each listening on its own IP, on the standaard > POP-3 port. definetly possible. You just need to find a POP daemon to support it. I just checked cucipop and it doesn't look like it does. -- John The difference between a good man and a bad one is the choice of cause - William James -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
[SLUG] multiple POP-3 servers on one machine
A question from someone not on the list: Is it possible to run two (or more) 'virtual' POP-3 servers on the one Linux box, each listening on its own IP, on the standaard POP-3 port. -- Rick Welykochy || Praxis Services -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug