tags 625732 -moreinfo thanks On Thu, May 05, 2011 at 06:03:52PM +0200, Ricardo Mones wrote: > On Thu, May 05, 2011 at 04:25:01PM +0200, Pierre Habouzit wrote: > > Package: claws-mail > > Version: 3.7.9-1 > > Severity: important > > > > > > When claws-mail is configured to authenticate against NNTP it disregards > > the "authenticate on connect" settings which makes it unable to connect > > to INN for example. > > > > Indeed, it always performs AUTHINFO before it sends the required "MODE > > READER" on the connection. > > I don't have an authenticated INN server, can you provide the network log > where this bug appears to forward it upstream? > Network log window option is located on Tools menu.
I have taken a tcpdump capture, there is a checkbox to decide whether authentication should be done at connect time or not which isn't enforced (it's obvious in the code). The proper NNTP should be: C: MODE READER S: .... C: AUTHINFO USER <username> S: ... C: AUTHINFO PASS <password> S: ... Sadly claws doesn't send the MODE READER front, and INN replies with "502 Authentication will fail": C: AUTHINFO USER <username> S: 502 Authentication will fail The first part of the bug is that src/news.c:368 for me, you have: if ((session != NULL) && ac->use_nntp_auth) { /* FIXME: && ac->use_nntp_auth_onconnect */ Clearly this code should only be done when use_nntp_auth_onconnect is set. Though when use_nntp_auth_onconnect isn't set, MODE READER should be sent *then* authentication performed. The code is just absent from the code. It's rather easy to setup a local inn2 server with auth: $ apt-get install inn2 edit /etc/news/readers.conf to add auth: "ckpasswd -f /etc/news/newsusers" in the auth "localhost" block. $ echo "test:tVuLg3e2/DA0s" > /etc/news/newsusers $ chown news:news /etc/news/newsusers $ /etc/init.d/inn2 restart That gives you an inn on localhost that you have to authenticate against with user test, password test. And there it is: $telnet localhost 119 Trying ::1... Connected to apollon.madism.org. Escape character is '^]'. 200 server.example.net InterNetNews server INN 2.5.3 (20110413 snapshot) ready (transit mode) MODE READER 200 server.example.net InterNetNews NNRP server INN 2.5.3 (20110413 snapshot) ready (posting ok) AUTHINFO USER test 381 Enter password AUTHINFO PASS test 281 Authentication succeeded What claws does: $ telnet localhost 119 Trying ::1... Connected to apollon.madism.org. Escape character is '^]'. 200 server.example.net InterNetNews server INN 2.5.3 (20110413 snapshot) ready (transit mode) AUTHINFO USER test 502 Authentication will fail Enjoy -- ·O· Pierre Habouzit ··O madco...@debian.org OOO http://www.madism.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org