[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] Proxy support patch
On Thu, Oct 16, 2014 at 5:00 PM, Martin Lambers <marlam@...23...> wrote:
> OK, I pushed the patch to the git repository, complete with new
> proxy_host and proxy_port commands and corresponding options, and
> documentation.
>
> Please test.
The docs don't say anything about which socks version is
actually supported for the user. They need to say socks5.
Consider a --proxy-type option default of socks5, incase
someone adds 4/4a/CONNECT or some other type later.
--proxy-host / proxy_host should say [IP|hostname]
--proxy-port / proxy_port should say [number|name]
./src/conf.c: a->proxy_port = 0;
./src/conf.c: if (acc->proxy_port < 1 || acc->proxy_port > 65535)
./src/msmtp.c: if (conf->cmdline_account->proxy_port < 1
./src/msmtp.c: ||
conf->cmdline_account->proxy_port > 65535)
./src/msmtp.c: conf->cmdline_account->proxy_port = 0;
./src/msmtp.c: if (account->proxy_host && account->proxy_port == 0)
... and various other places in the same context...
Zero is a valid, well known, seen on the net, yet reserved port number.
So you probably want these to be NULL and < 0 || > 65535 || NULL, etc ...
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
I like the capturing of socks server response codes.
I've not really looked over the full diff yet.