[Spambayes] Unable to bind different addresses to port 110?

Richie Hindle richie at entrian.com
Tue Jul 22 04:05:14 EDT 2003


[Tony]
> Richie, is the pop3proxy meant to be able to accept servers and
> addresses for the 'port' to proxy on?

Yes, it is intended to work like that.  After much digging with CVS, I
find that it was broken back in April by someone named anadelonbrin - not
sure who he is... 8-)

Options.py defines listen_ports as a PORT, and OptionsClass.py defines a
PORT as '[\d]+'.  I don't know much about this code, but changing PORT to
SERVER seems to work - certainly the code in pop3proxy.py that actually
uses the value will cope with either "address:port" or "port".

However, I think this is probably stretching the definition of SERVER to
its limits - the way it's defined makes it look as though it's intended to
mean "address and optional port" rather than "at least one of address and
port".

After changing the type to SERVER the proxy works fine, the displayed
values (on the Home page of the web UI) work fine, and the validation code
in ProxyUI.py still considers the settings to be OK even when they include
addresses.  We might want to add something to the option's description:
"To run multiple proxies on the same port, you can specify multiple local
addresses like this: 127.0.0.1:110, 127.0.0.2:110"  But it's a bit
propeller-head - might be better left to a FAQ.

I'll check in the one-line change if it's OK by you, because it really
does fix the problem, but I do want to run it past you first because of
the possible abuse of SERVER.  And because it's 3am and I may not be at my
code-analysing best.  8-)

-- 
Richie Hindle
richie at entrian.com




More information about the Spambayes mailing list