Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

pb connect to a news server with authentification ?

 [1/2] from: patrick::scotto::wanadoo::fr at: 24-Sep-2002 19:06


hello, need some help please , i wrote this to send a message to a news server , but this one needs an authentification like AUTHINFO USER testmod and AUTHINFO PASS qq how to modify this program to add authentification ? --------- trace/net on nntp: make object! [ url: make url! "" auth: make string! "" pass: make string! "" header: make object! [ from: make string! "" subject: make string! "" date: make string! "" approved: make string! "" content-type: make string! "text/plain;charset=iso-8859-15" message-id: make string! "" newsgroups: make string! "" ] make-id: does [ rejoin [ "<" checksum form now random 999999 "." system/user/email ">" ] ] send: function [ subject message from typ] [ url ] [ url: to-url join self/url [ "/" nntp/header/newsgroups ] header/approved: "[testmod--myhome--fr]" header/message-id: make-id header/date: to-idate now header/subject: copy subject header/from: from header/content-type: typ write url rejoin [ net-utils/export header newline newline message newline ] ] ] nntp/url: nntp://200.75.102.165 ;nntp/auth: "USERINFO USER testmod" ;nntp/pass: "USERINFO PASS qq" nntp/header/newsgroups: "testmod" nntp/send "sujet de post" "test debaratin" "[toto--marine--def]" text/plain;charset=iso-8859-15 ; resultat obtenu ------------- comment: [ Net-log: ["Opening tcp for" NNTP] connecting to: 200.75.102.165 Net-log: [none "20"] Net-log: {200 adj-msg. Netscape-Collabra/3.54 24102 NNRP ready (posting ok).} Net-log: [none "20"] Net-log: {200 adj-msg. Netscape-Collabra/3.54 24102 NNRP ready (posting ok).} Net-log: ["GROUP testmod" "211"] Net-log: "211 9 1 9 testmod" Net-log: [none "2"] Net-log: "221 MESSAGE-ID fields follow" Net-log: ["POST" "3"] Net-log: "340 Ok" Net-log: ["." "2"] Net-log: ["QUIT" "205"] Net-log: "205" ** User Error: Server error: tcp 480 Authentication required for command ** Near: write url rejoin [ net-utils/export header newline newline message newline ] ]

 [2/2] from: gscottjones:mchsi at: 24-Sep-2002 16:27


Hi, Patrick, From: "patrick.scotto"
> need some help please , > i wrote this to send a message to a news server , but this one needs an > authentification like > AUTHINFO USER testmod > and AUTHINFO PASS qq > how to modify this program to add authentification ?
rest of message: http://www.escribe.com/internet/rebol/m25846.html There could be more than one thing going on here, but I think that the simplest thing to try is to change the following line: nntp/url: nntp://200.75.102.165 to nntp/url: nntp://testmod:[qq--200--75--102--165] The nntp scheme should parse out the user name (testmod) and password (qq), as long as there is not an @ in the user name. When the server asks nntp for the authentication, it will supply it, hopefully. What is curious is that having trace/net on should have revealed the place at which authentication was requested, which it didn't. So there may be more than one thing going on. Apparently, authentication for nntp is not a part of the original specification, and is an extension, and not implemented uniformly. Give the above change a try before you do much else. Good luck. --Scott Jones