Re: Command-line POP3S client for gmail?
"Kelly Jones" <[email protected]>
| Newsgroups | gmane.org.user-groups.nmlug |
|---|---|
| Message-ID | <[email protected]> |
Works perfectly from the command line: > sh -c "/usr/bin/openssl s_client -quiet -connect pop.gmail.com:995 2> /dev/nu\ ll" +OK Gpop ready for requests from [...] 26pf2868082wra QUIT +OK Bye 26pf2868082wra but not when I do this in xinetd.conf: server = /bin/sh server_args = -c "/usr/bin/openssl s_client -quiet -connect pop.gmail.com:995 2> /dev/null" (server_args all on one line in xinetd.conf) and try telnet: > telnet localhost pop3 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. s_client: -c: line 1: unexpected EOF while looking for matching `"' s_client: -c: line 2: syntax error: unexpected end of file Connection closed by foreign host. Even fails if I remove the "2> /dev/null" part from xinetd.conf On 11/23/06, Anthony Martinez <[email protected]> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Kelly Jones wrote: > > OK, I added this to xinetd.conf and restarted xinetd: > > > > # testing ssl client to gmail pop3s > > service pop3 > > { > > disable = no > > socket_type = stream > > wait = no > > user = user > > server = /usr/bin/openssl > > server_args = s_client -quiet -connect pop.gmail.com:995 > > only_from = 127.0.0.1 > > } > > > > That looks good. > > > I then did "telnet localhost pop3" and got this: > > > >> telnet localhost 110 > > Trying 127.0.0.1... > > Connected to localhost. > > Escape character is '^]'. > > depth=0 /C=US/ST=California/L=Mountain View/O=Google > > Inc./CN=pop.gmail.com <http://pop.gmail.com> > > verify error:num=20:unable to get local issuer certificate > > verify return:1 > > depth=0 /C=US/ST=California/L=Mountain View/O=Google > > Inc./CN=pop.gmail.com <http://pop.gmail.com> > > verify error:num=27:certificate not trusted > > verify return:1 > > depth=0 /C=US/ST=California/L=Mountain View/O=Google > > Inc./CN=pop.gmail.com <http://pop.gmail.com> > > verify error:num=21:unable to verify the first certificate > > verify return:1 > > +OK Gpop ready for requests from [...] 33pf2818677wra > > QUIT > > +OK Bye 33pf2818677wra > > read:errno=0 > > Connection closed by foreign host. > > > > That, on the other hand, doesn't look so good. > > I don't think that redirections will work as stated. As a next step, try > something horribly gross like this: > > service pop3 > { > disable = no > socket_type = stream > wait = no > user = user > server = /bin/sh > server_args = -c "/usr/bin/openssl s_client -quiet -connect > pop.gmail.com:995 > 2>/dev/null" > only_from = 127.0.0.1 > } > > > > All the verify garbage (which is s_client's stderr, not stdout) > > confuses popclient. How do I get rid of it? I tried "-verify 0" and > > even "2> /dev/null" on the server_args line, didn't help. > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > > iD8DBQFFZjQiKaiGM/xGKzQRAtnjAJ91yJjHDwgUQBIpiTtQuLh23NH5HQCfSuWn > 3XMvmIGNkQ0HoLT93yub05c= > =5E0n > -----END PGP SIGNATURE----- > _______________________________________________ > NMLUG mailing list > [email protected] > http://www.nmlug.org/mailman/listinfo/nmlug > _______________________________________________ NMLUG mailing list [email protected] http://www.nmlug.org/mailman/listinfo/nmlug