wishesservicetemporarilyunavailable
NetworkWorkingGroupC.
FeatherRequestforComments:3977THUSplcObsoletes:977October2006Updates:2980Category:StandardsTrackNetworkNewsTransferProtocol(NNTP)StatusofThisMemoThisdocumentspecifiesanInternetstandardstrackprotocolfortheInternetcommunity,andrequestsdiscussionandsuggestionsforimprovements.
Pleaserefertothecurrenteditionofthe"InternetOfficialProtocolStandards"(STD1)forthestandardizationstateandstatusofthisprotocol.
Distributionofthismemoisunlimited.
CopyrightNoticeCopyright(C)TheInternetSociety(2006).
AbstractTheNetworkNewsTransferProtocol(NNTP)hasbeeninuseintheInternetforadecade,andremainsoneofthemostpopularprotocols(byvolume)inusetoday.
ThisdocumentisareplacementforRFC977,andofficiallyupdatestheprotocolspecification.
ItclarifiessomevaguenessinRFC977,includessomenewbasefunctionality,andprovidesaspecificmechanismtoaddstandardizedextensionstoNNTP.
TableofContents1.
Introduction31.
1.
Author'sNote42.
Notation53.
BasicConcepts63.
1.
CommandsandResponses63.
1.
1.
Multi-lineDataBlocks83.
2.
ResponseCodes93.
2.
1.
GenericResponseCodes103.
2.
1.
1.
Examples123.
3.
CapabilitiesandExtensions143.
3.
1.
CapabilityDescriptions143.
3.
2.
StandardCapabilities153.
3.
3.
Extensions163.
3.
4.
InitialIANARegister183.
4.
MandatoryandOptionalCommands20FeatherStandardsTrack[Page1]RFC3977NetworkNewsTransferProtocol(NNTP)October20063.
4.
1.
ReadingandTransitServers213.
4.
2.
ModeSwitching213.
5.
Pipelining223.
5.
1.
Examples233.
6.
Articles244.
TheWILDMATFormat254.
1.
WildmatSyntax264.
2.
WildmatSemantics264.
3.
Extensions274.
4.
Examples275.
SessionAdministrationCommands285.
1.
InitialConnection285.
2.
CAPABILITIES295.
3.
MODEREADER325.
4.
QUIT346.
ArticlePostingandRetrieval356.
1.
GroupandArticleSelection366.
1.
1.
GROUP366.
1.
2.
LISTGROUP396.
1.
3.
LAST426.
1.
4.
NEXT446.
2.
RetrievalofArticlesandArticleSections456.
2.
1.
ARTICLE466.
2.
2.
HEAD496.
2.
3.
BODY516.
2.
4.
STAT536.
3.
ArticlePosting566.
3.
1.
POST566.
3.
2.
IHAVE587.
InformationCommands617.
1.
DATE617.
2.
HELP627.
3.
NEWGROUPS637.
4.
NEWNEWS647.
5.
Time657.
5.
1.
Examples667.
6.
TheLISTCommands667.
6.
1.
LIST677.
6.
2.
StandardLISTKeywords697.
6.
3.
LISTACTIVE707.
6.
4.
LISTACTIVE.
TIMES717.
6.
5.
LISTDISTRIB.
PATS727.
6.
6.
LISTNEWSGROUPS738.
ArticleFieldAccessCommands738.
1.
ArticleMetadata748.
1.
1.
The:bytesMetadataItem748.
1.
2.
The:linesMetadataItem758.
2.
DatabaseConsistency75FeatherStandardsTrack[Page2]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
3.
OVER768.
4.
LISTOVERVIEW.
FMT818.
5.
HDR838.
6.
LISTHEADERS879.
AugmentedBNFSyntaxforNNTP909.
1.
Introduction909.
2.
Commands929.
3.
CommandContinuation939.
4.
Responses939.
4.
1.
GenericResponses939.
4.
2.
InitialResponseLineContents949.
4.
3.
Multi-lineResponseContents949.
5.
CapabilityLines959.
6.
LISTVariants969.
7.
Articles979.
8.
GeneralNon-terminals979.
9.
ExtensionsandValidation9910.
InternationalisationConsiderations10010.
1.
IntroductionandHistoricalSituation10010.
2.
ThisSpecification10110.
3.
OutstandingIssues10211.
IANAConsiderations10312.
SecurityConsiderations10312.
1.
PersonalandProprietaryInformation10412.
2.
AbuseofServerLogInformation10412.
3.
WeakAuthenticationandAccessControl10412.
4.
DNSSpoofing10412.
5.
UTF-8Issues10512.
6.
CachingofCapabilityLists10613.
Acknowledgements10714.
References11014.
1.
NormativeReferences11014.
2.
InformativeReferences110A.
InteractionwithOtherSpecifications112A.
1.
HeaderFolding112A.
2.
Message-IDs112A.
3.
ArticlePosting114B.
SummaryofCommands115C.
SummaryofResponseCodes117D.
ChangesfromRFC9771211.
IntroductionThisdocumentspecifiestheNetworkNewsTransferProtocol(NNTP),whichisusedforthedistribution,inquiry,retrieval,andpostingofNetnewsarticlesusingareliablestream-basedmechanism.
Fornews-readingclients,NNTPenablesretrievalofnewsarticlesthatFeatherStandardsTrack[Page3]RFC3977NetworkNewsTransferProtocol(NNTP)October2006arestoredinacentraldatabase,givingsubscriberstheabilitytoselectonlythosearticlestheywishtoread.
TheNetnewsmodelprovidesforindexing,cross-referencing,andexpirationofagedmessages.
NNTPisdesignedforefficienttransmissionofNetnewsarticlesoverareliablefullduplexcommunicationchannel.
AlthoughtheprotocolspecificationinthisdocumentislargelycompatiblewiththeversionspecifiedinRFC977[RFC977],anumberofchangesaresummarisedinAppendixD.
Inparticular:othedefaultcharactersetischangedfromUS-ASCII[ANSI1986]toUTF-8[RFC3629](notethatUS-ASCIIisasubsetofUTF-8);oanumberofcommandsthatwereoptionalinRFC977orthathavebeentakenfromRFC2980[RFC2980]arenowmandatory;andoaCAPABILITIEScommandhasbeenaddedtoallowclientstodeterminewhatfunctionalityisavailablefromaserver.
Thekeywords"MUST","MUSTNOT","REQUIRED","SHALL","SHALLNOT","SHOULD","SHOULDNOT","RECOMMENDED","MAY",and"OPTIONAL"inthisdocumentaretobeinterpretedasdescribedinRFC2119[RFC2119].
AnimplementationisnotcompliantifitfailstosatisfyoneormoreoftheMUSTrequirementsforthisprotocol.
AnimplementationthatsatisfiesalltheMUSTandalltheSHOULDrequirementsforitsprotocolsissaidtobe"unconditionallycompliant";onethatsatisfiesalltheMUSTrequirementsbutnotalltheSHOULDrequirementsforNNTPissaidtobe"conditionallycompliant".
Fortheremainderofthisdocument,theterms"client"and"clienthost"refertoahostmakinguseoftheNNTPservice,whiletheterms"server"and"serverhost"refertoahostthatofferstheNNTPservice.
1.
1.
Author'sNoteThisdocumentiswritteninXMLusinganNNTP-specificDTD.
CustomsoftwareisusedtoconvertthistoRFC2629[RFC2629]format,andthenthepublic"xml2rfc"packagetofurtherreducethistotext,nroffsource,andHTML.
Noperlwasusedinproducingthisdocument.
FeatherStandardsTrack[Page4]RFC3977NetworkNewsTransferProtocol(NNTP)October20062.
NotationThefollowingnotationalconventionsareusedinthisdocument.
UPPERCASEindicatesliteraltexttobeincludedinthecommand.
lowercaseindicatesatokendescribedelsewhere.
[brackets]indicatethattheenclosedmaterialisoptional.
ellipticalindicatesthattheargumentmayberepeatedany.
.
.
marksnumberoftimes(itmustoccuratleastonce).
vertical|barindicatesachoiceoftwomutuallyexclusivearguments(exactlyonemustbeprovided).
Thename"message-id"foracommandorresponseargumentindicatesthatitisthemessage-idofanarticleasdescribedinSection3.
6,includingtheanglebrackets.
Thename"wildmat"foranargumentindicatesthatitisawildmatasdefinedinSection4.
Iftheargumentdoesnotmeettherequirementsofthatsection(forexample,ifitdoesnotfitthegrammarofSection4.
1),theNNTPserverMAYplacesomeinterpretationonit(notspecifiedbythisdocument)orotherwiseMUSTtreatitasasyntaxerror.
Responsesforeachcommandwillbedescribedintableslistingtherequiredformatofaresponsefollowedbythemeaningthatshouldbeascribedtothatresponse.
Theterms"NUL","TAB","LF","CR,and"space"refertotheoctets%x00,%x09,%x0A,%x0D,and%x20,respectively(thatis,theoctetswiththosecodesinUS-ASCII[ANSI1986]andthusinUTF-8[RFC3629]).
Theterm"CRLF"or"CRLFpair"meansthesequenceCRimmediatelyfollowedbyLF(thatis,%x0D.
0A).
A"printableUS-ASCIIcharacter"isanoctetintherange%x21-7E.
QuotedcharactersrefertotheoctetswiththosecodesinUS-ASCII(so".
"and"[S]500PermissiondeniedExampleofanattempttoaccessafacilityrequiringauthentication:[C]GROUPsecret.
group[S]480PermissiondeniedExampleofasuccessfulattemptfollowingsuchauthentication:[C]XSECRETfredflintstone[S]290Passwordforfredaccepted[C]GROUPsecret.
group[S]2115120secret.
groupselectedExampleofanattempttoaccessafacilityrequiringprivacy:[C]GROUPsecret.
group[S]483Secureconnectionrequired[C]XENCRYPT[Clientandservernegotiateencryptiononthelink][S]283Encryptedlinkestablished[C]GROUPsecret.
group[S]2115120secret.
groupselectedExampleofaneedtochangemodebeforeafacilityisused:[C]GROUPbinary.
group[S]401XHOSTNotonthisvirtualhost[C]XHOSTbinary.
news.
example.
org[S]290binary.
news.
example.
orgvirtualhostselected[C]GROUPbinary.
group[S]2115177binary.
groupselectedFeatherStandardsTrack[Page13]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofatemporaryfailure:[C]GROUParchive.
local[S]403ArchiveservertemporarilyofflineExampleoftheserverneedingtoclosedownimmediately:[C]ARTICLE123[S]400Powersupplyfailed,runningonUPS[Serverclosesconnection.
]3.
3.
CapabilitiesandExtensionsNotallNNTPserversprovideexactlythesamefacilities,bothbecausethisspecificationallowsvariationandbecauseserversmayprovideextensions.
Asetoffacilitiesthatarerelatedarecalleda"capability".
Thisspecificationprovidesawaytodeterminewhatcapabilitiesareavailable,includesalistofstandardcapabilities,andincludesamechanism(theextensionmechanism)fordefiningnewcapabilities.
3.
3.
1.
CapabilityDescriptionsAclientcandeterminetheavailablecapabilitiesoftheserverbyusingtheCAPABILITIEScommand(Section5.
2).
Thisreturnsacapabilitylist,whichisalistofcapabilitylines.
Eachlinedescribesoneavailablecapability.
Eachcapabilitylineconsistsofoneormoretokens,whichMUSTbeseparatedbyoneormorespaceorTABcharacters.
Atokenisastringof1ormoreprintableUTF-8characters(thatis,eitherprintableUS-ASCIIcharactersoranyUTF-8sequenceoutsidetheUS-ASCIIrange,butnotspaceorTAB).
Unlessstatedotherwise,tokensarecaseinsensitive.
Eachcapabilitylineconsistsofthefollowing:oThecapabilitylabel,whichisakeywordindicatingthecapability.
Acapabilitylabelmaybedefinedbythisspecificationorasuccessor,orbyanextension.
oThelabelisthenfollowedbyzeroormoretokens,whichareargumentsofthecapability.
Theformandmeaningofthesetokensisspecifictoeachcapability.
TheserverMUSTensurethatthecapabilitylistaccuratelyreflectsthecapabilities(includingextensions)currentlyavailable.
Ifacapabilityisonlyavailablewiththeserverinacertainstate(forexample,onlyafterauthentication),thelistMUSTonlyincludetheFeatherStandardsTrack[Page14]RFC3977NetworkNewsTransferProtocol(NNTP)October2006capabilitylabelwhentheserverisinthatstate.
Similarly,ifonlysomeofthecommandsinanextensionwillbeavailable,orifthebehaviouroftheextensionwillchangeinsomeothermanner,accordingtothestateoftheserver,thisMUSTbeindicatedbydifferentargumentsinthecapabilityline.
Notethatacapabilitylinecanonlybeginwithaletter.
Linesbeginningwithothercharactersarereservedforfutureversionsofthisspecification.
Inordertointeroperatewithsuchversions,clientsMUSTbepreparedtoreceivelinesbeginningwithothercharactersandMUSTignoreanytheydonotunderstand.
3.
3.
2.
StandardCapabilitiesThefollowingcapabilitiesaredefinedbythisspecification.
VERSIONThiscapabilityMUSTbeadvertisedbyallserversandMUSTbethefirstcapabilityinthecapabilitylist;itindicatestheversion(s)ofNNTPthattheserversupports.
Theremustbeatleastoneargument;eachargumentisadecimalnumberandMUSTNOThavealeadingzero.
VersionnumbersareassignedonlyinRFCsthatupdateorreplacethisspecification;serversMUSTNOTcreatetheirownversionnumbers.
Theversionnumberofthisspecificationis2.
READERThiscapabilityindicatesthattheserverimplementsthevariouscommandsusefulforreadingclients.
IHAVEThiscapabilityindicatesthattheserverimplementstheIHAVEcommand.
POSTThiscapabilityindicatesthattheserverimplementsthePOSTcommand.
NEWNEWSThiscapabilityindicatesthattheserverimplementstheNEWNEWScommand.
HDRThiscapabilityindicatesthattheserverimplementstheheaderaccesscommands(HDRandLISTHEADERS).
FeatherStandardsTrack[Page15]RFC3977NetworkNewsTransferProtocol(NNTP)October2006OVERThiscapabilityindicatesthattheserverimplementstheoverviewaccesscommands(OVERandLISTOVERVIEW.
FMT).
Ifandonlyiftheserversupportsthemessage-idformoftheOVERcommand,theremustbeasingleargumentMSGID.
LISTThiscapabilityindicatesthattheserverimplementsatleastonevariantoftheLISTcommand.
ThereMUSTbeoneargumentforeachvariantoftheLISTcommandsupportedbytheserver,givingthekeywordforthatvariant.
IMPLEMENTATIONThiscapabilityMAYbeprovidedbyaserver.
Ifso,theargumentsSHOULDbeusedtoprovideinformationsuchastheserversoftwarenameandversionnumber.
TheclientMUSTNOTusethislinetodeterminecapabilitiesoftheserver.
(Whileserversoftenprovidethisinformationintheinitialgreeting,clientsneedtoguesswhetherthisisthecase;thiscapabilitymakesitclearwhattheinformationis.
)MODE-READERThiscapabilityindicatesthattheserverismode-switching(Section3.
4.
2)andthattheMODEREADERcommandneedstobeusedtoenabletheREADERcapability.
3.
3.
3.
ExtensionsAlthoughNNTPiswidelyandrobustlydeployed,somepartsoftheInternetcommunitymightwishtoextendtheNNTPservice.
ItmustbeemphasizedthatanyextensiontoNNTPshouldnotbeconsideredlightly.
NNTP'sstrengthcomesprimarilyfromitssimplicity.
Experiencewithmanyprotocolshasshownthat:Protocolswithfewoptionstendtowardsubiquity,whilstprotocolswithmanyoptionstendtowardsobscurity.
Thismeansthateachandeveryextension,regardlessofitsbenefits,mustbecarefullyscrutinizedwithrespecttoitsimplementation,deployment,andinteroperabilitycosts.
Inmanycases,thecostofextendingtheNNTPservicewilllikelyoutweighthebenefit.
Anextensionisapackageofassociatedfacilities,oftenbutnotalwaysincludingoneormorenewcommands.
EachextensionMUSTdefineatleastonenewcapabilitylabel(thiswilloften,butneednot,bethenameofoneofthesenewcommands).
WhileanyadditionalcapabilityinformationcannormallybespecifiedusingargumentstoFeatherStandardsTrack[Page16]RFC3977NetworkNewsTransferProtocol(NNTP)October2006thatlabel,anextensionMAYdefinemorethanonecapabilitylabel.
However,thisSHOULDbelimitedtoexceptionalcircumstances.
Anextensioniseitheraprivateextension,oritscapabilitiesareincludedintheIANAregistryofcapabilities(seeSection3.
3.
4)anditisdefinedinanRFC(inwhichcaseitisa"registeredextension").
SuchRFCseithermustbeonthestandardstrackormustdefineanIESG-approvedexperimentalprotocol.
Thedefinitionofanextensionmustincludethefollowing:oadescriptivenamefortheextension.
othecapabilitylabelorlabelsdefinedbytheextension(thecapabilitylabelofaregisteredextensionMUSTNOTbeginwith"X").
oThesyntax,values,andmeaningsofanyargumentsforeachcapabilitylabeldefinedbytheextension.
oAnynewNNTPcommandsassociatedwiththeextension(thenamesofcommandsassociatedwithregisteredextensionsMUSTNOTbeginwith"X").
oThesyntaxandpossiblevaluesofargumentsassociatedwiththenewNNTPcommands.
oTheresponsecodesandpossiblevaluesofargumentsfortheresponsesofthenewNNTPcommands.
oAnynewargumentstheextensionassociateswithanyotherpre-existingNNTPcommands.
oAnyincreaseinthemaximumlengthofcommandsandinitialresponselinesoverthevaluespecifiedinthisdocument.
oAspecificstatementabouttheeffectonpipeliningthatthisextensionmayhave(ifany).
oAspecificstatementaboutthecircumstanceswhenuseofthisextensioncanalterthecontentsofthecapabilitieslist(otherthanthenewcapabilitylabelsitdefines).
oAspecificstatementaboutthecircumstancesunderwhichtheextensioncancauseanypre-existingcommandtoproducea401,480,or483response.
FeatherStandardsTrack[Page17]RFC3977NetworkNewsTransferProtocol(NNTP)October2006oAdescriptionofhowtheuseofMODEREADERonamode-switchingserverinteractswiththeextension.
oAdescriptionofhowsupportfortheextensionaffectsthebehaviourofaserverandNNTPclientinanyothermannernotoutlinedabove.
oFormalsyntaxasdescribedinSection9.
9.
AprivateextensionMAYorMAYNOTbeincludedinthecapabilitieslist.
Ifitis,thecapabilitylabelMUSTbeginwith"X".
AserverMAYprovideadditionalkeywords(fornewcommandsandalsofornewvariantsofexistingcommands)aspartofaprivateextension.
Toavoidtheriskofaclashwithafutureregisteredextension,thesekeywordsSHOULDbeginwith"X".
Iftheserveradvertisesacapabilitydefinedbyaregisteredextension,itMUSTimplementtheextensionsoastofullyconformwiththespecification(forexample,itMUSTimplementallthecommandsthattheextensiondescribesasmandatory).
Ifitdoesnotimplementtheextensionasspecified,itMUSTNOTlisttheextensioninthecapabilitieslistunderitsregisteredname.
Inthatcase,itMAY,butSHOULDNOT,provideaprivateextension(notlisted,orlistedwithadifferentname)thatimplementspartoftheextensionorimplementsthecommandsoftheextensionwithadifferentmeaning.
AserverMUSTNOTsenddifferentresponsecodestobasicNNTPcommandsdocumentedhereortocommandsdocumentedinregisteredextensionsinresponsetotheavailabilityoruseofaprivateextension.
3.
3.
4.
InitialIANARegisterIANAwillmaintainaregistryofNNTPcapabilitylabels.
AllcapabilitylabelsintheregistryMUSTbekeywordsandMUSTNOTbeginwithX.
FeatherStandardsTrack[Page18]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Theinitialcontentoftheregistryconsistsoftheseentries:|Label|Meaning|Definition||AUTHINFO|Authentication|[NNTP-AUTH]||||||HDR|Batchedheaderretrieval|Section3.
3.
2,||||Section8.
5,and||||Section8.
6||||||IHAVE|IHAVEcommandavailable|Section3.
3.
2and||||Section6.
3.
2||||||IMPLEMENTATION|Server|Section3.
3.
2|||implementation-specific||||information|||||||LIST|LISTcommandvariants|Section3.
3.
2and||||Section7.
6.
1||||||MODE-READER|Mode-switchingserver|Section3.
4.
2|||andMODEREADERcommand||||available|||||||NEWNEWS|NEWNEWScommand|Section3.
3.
2and|||available|Section7.
4||||||OVER|Overviewsupport|Section3.
3.
2,||||Section8.
3,and||||Section8.
4||||||POST|POSTcommandavailable|Section3.
3.
2and||||Section6.
3.
1||||||READER|Readercommands|Section3.
3.
2|||available|||||||SASL|SupportedSASL|[NNTP-AUTH]|||mechanisms|||||||STARTTLS|Transportlayersecurity|[NNTP-TLS]||||||STREAMING|Streamingfeeds|[NNTP-STREAM]||||||VERSION|SupportedNNTPversions|Section3.
3.
2|FeatherStandardsTrack[Page19]RFC3977NetworkNewsTransferProtocol(NNTP)October20063.
4.
MandatoryandOptionalCommandsForanumberofreasons,notallthecommandsinthisspecificationaremandatory.
However,itisequallyundesirableforeverycommandtobeoptional,sincethismeansthataclientwillhavenoideawhatfacilitiesareavailable.
Therefore,asacompromise,someofthecommandsinthisspecificationaremandatory(theymustbesupportedbyallservers)whiletheremainderarenot.
Thelatterarethensubdividedintobundles,eachindicatedbyasinglecapabilitylabel.
oIfthelabelisincludedinthecapabilitylistreturnedbytheserver,theserverMUSTsupportallcommandsinthatbundle.
oIfthelabelisnotincluded,theserverMAYsupportnoneorsomeofthecommandsbutSHOULDNOTsupportallofthem.
Ingeneral,therewillbenowayforaclienttodeterminewhichcommandsaresupportedwithouttryingthem.
Thebundleshavebeenchosentoprovideusefulfunctionality,andthereforeserverauthorsarediscouragedfromimplementingonlypartofabundle.
Thedescriptionofeachcommandwilleitherindicatethatitismandatory,orwillgive,usingtheterm"indicatingcapability",thecapabilitylabelindicatingwhetherthebundleincludingthiscommandisavailable.
Whereaserverdoesnotimplementacommand,itMUSTalwaysgeneratea500genericresponsecode(ora501genericresponsecodeinthecaseofavariantofacommanddependingonasecondkeywordwherethebasecommandisrecognised).
Otherwise,thecommandMUSTbefullyimplementedasspecified;aserverMUSTNOTonlypartiallyimplementanyofthecommandsinthisspecification.
(Clientauthorsshouldnotethatsomeserversnotconformingtothisspecificationwillreturna502genericresponsecodetosomecommandsthatarenotimplemented.
)Note:somecommandshavecasesthatrequireothercommandstobeusedfirst.
Iftheformercommandisimplementedbutthelatterisnot,theformerMUSTstillgeneratetherelevantspecificresponsecode.
Forexample,ifARTICLE(Section6.
2.
1)isimplementedbutGROUP(Section6.
1.
1)isnot,thecorrectresponseto"ARTICLE1234"remains412.
FeatherStandardsTrack[Page20]RFC3977NetworkNewsTransferProtocol(NNTP)October20063.
4.
1.
ReadingandTransitServersNNTPistraditionallyusedintwodifferentways.
Thefirstuseis"reading",wheretheclientfetchesarticlesfromalargestoremaintainedbytheserverforimmediateorlaterpresentationtoauserandsendsarticlescreatedbythatuserbacktotheserver(anactioncalled"posting")tobestoredanddistributedtootherstoresandusers.
Theseconduseisforthebulktransferofarticlesfromonestoretoanother.
Sincethehostsmakingthistransfertendtobepeersinanetworkthattransmitarticlesamongoneanother,andnotend-usersystems,thisprocessiscalled"peering"or"transit".
(Evenso,onehostisstilltheclientandtheotheristheserver).
Inpractice,thesetwousesaresodifferentthatsomeserverimplementationsareoptimisedforreadingorfortransitand,asaresult,donotoffertheotherfacilityoronlyofferlimitedfeatures.
Otherimplementationsaremoregeneralandofferboth.
Thisspecificationallowsforthisbybundlingtherelevantcommandsaccordingly:theIHAVEcommandisdesignedfortransit,whilethecommandsindicatedbytheREADERcapabilityaredesignedforreadingclients.
ExceptasaneffectoftheMODEREADERcommand(Section5.
3)onamode-switchingserver,onceaserveradvertiseseitherorbothoftheIHAVEorREADERcapabilities,itMUSTcontinuetoadvertisethemfortheentiresession.
AserverMAYprovidedifferentmodesofbehaviour(transit,reader,oracombination)todifferentclientconnectionsandMAYuseexternalinformation,suchastheIPaddressoftheclient,todeterminewhichmodetoprovidetoanygivenconnection.
TheofficialTCPportfortheNNTPserviceis119.
However,ifahostwishestoofferseparateserversfortransitandreadingclients,port433SHOULDbeusedforthetransitserverand119forthereadingserver.
3.
4.
2.
ModeSwitchingAnimplementationMAY,butSHOULDNOT,providebothtransitandreaderfacilitiesonthesameserverbutrequiretheclienttoselectwhichitwishestouse.
Suchanarrangementiscalleda"mode-switching"server.
FeatherStandardsTrack[Page21]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Amode-switchingserverhastwomodes:oTransitmode,whichappliesaftertheinitialconnection.
*ItMUSTadvertisetheMODE-READERcapability.
*ItMUSTNOTadvertisetheREADERcapability.
However,theserverMAYceasetoadvertisetheMODE-READERcapabilityaftertheclientusesanycommandexceptCAPABILITIES.
oReadingmode,afterasuccessfulMODEREADERcommand(seeSection5.
3).
*ItMUSTNOTadvertisetheMODE-READERcapability.
*ItMUSTadvertisetheREADERcapability.
*ItMAYNOTadvertisetheIHAVEcapability,evenifitwasadvertisingitintransitmode.
AclientSHOULDonlyissueaMODEREADERcommandtoaserverifitisadvertisingtheMODE-READERcapability.
IftheserverdoesnotsupportCAPABILITIES(andthereforedoesnotconformtothisspecification),theclientMAYusethefollowingheuristic:oIftheclientwishestouseany"reader"commands,itSHOULDusetheMODEREADERcommandimmediatelyaftertheinitialconnection.
oOtherwise,itSHOULDNOTusetheMODEREADERcommand.
Ineachcase,itshouldbepreparedforsomecommandstobeunavailablethatwouldhavebeenavailableifithadmadetheotherchoice.
3.
5.
PipeliningNNTPisdesignedtooperateoverareliablebi-directionalconnection,suchasTCP.
Therefore,ifacommanddoesnotdependontheresponsetothepreviousone,itshouldnotmatterifitissentbeforethatresponseisreceived.
Doingthisiscalled"pipelining".
However,certainserverimplementationsthrowawayalltextreceivedfromtheclientfollowingcertaincommandsbeforesendingtheirresponse.
Ifthishappens,pipeliningwillbeaffectedbecauseoneormorecommandswillhavebeenignoredormisinterpreted,andtheclientwillbematchingthewrongresponsestoeachcommand.
Sincetherearesignificantbenefitstopipelining,butalsocircumstanceswhereitisreasonableorcommonforserverstobehaveintheaboveFeatherStandardsTrack[Page22]RFC3977NetworkNewsTransferProtocol(NNTP)October2006manner,thisdocumentputscertainrequirementsonbothclientsandservers.
Exceptwherestatedotherwise,aclientMAYusepipelining.
Thatis,itmaysendacommandbeforereceivingtheresponseforthepreviouscommand.
TheserverMUSTallowpipeliningandMUSTNOTthrowawayanytextreceivedafteracommand.
Irrespectiveofwhetherpipeliningisused,theserverMUSTprocesscommandsintheordertheyaresent.
Ifthespecificdescriptionofacommandsaysit"MUSTNOTbepipelined",thatcommandMUSTendanypipelineofcommands.
Thatis,theclientMUSTNOTsendanyfollowingcommanduntilitreceivestheCRLFattheendoftheresponsefromthecommand.
TheserverMAYignoreanydatareceivedafterthecommandandbeforetheCRLFattheendoftheresponseissenttotheclient.
Theinitialconnectionmustnotbepartofapipeline;thatis,theclientMUSTNOTsendanycommanduntilitreceivestheCRLFattheendofthegreeting.
Iftheclientusesblockingsystemcallstosendcommands,itMUSTensurethattheamountoftextsentinpipeliningdoesnotcauseadeadlockbetweentransmissionandreception.
Theamountoftextinvolvedwilldependonwindowsizesinthetransmissionlayer;typically,itis4koctetsforTCP.
(Sincetheserveronlysendsdatainresponsetocommandsfromtheclient,theconverseproblemdoesnotoccur.
)3.
5.
1.
ExamplesExampleofcorrectuseofpipelining:[C]GROUPmisc.
test[C]STAT[C]NEXT[S]211123430002343002322misc.
test[S]2233000234retrieved[S]2233000237retrievedExampleofincorrectuseofpipelining(theMODEREADERcommandmaynotbepipelined):[C]MODEREADER[C]DATE[C]NEXT[S]200Serverready,postingallowed[S]2233000237retrievedFeatherStandardsTrack[Page23]RFC3977NetworkNewsTransferProtocol(NNTP)October2006TheDATEcommandhasbeenthrownawaybytheserver,sothereisno111responsetomatchit.
3.
6.
ArticlesNNTPisintendedtotransferarticlesbetweenclientsandservers.
Forthepurposesofthisspecification,articlesarerequiredtoconformtotherulesinthissection,andclientsandserversMUSTcorrectlyprocessanyarticlereceivedfromtheotherthatdoesso.
NotethatthisrequirementappliesonlytothecontentsofcommunicationsoverNNTP;itdoesnotpreventtheclientorserverfromsubsequentlyrejectinganarticleforreasonsoflocalpolicy.
AlsoseeAppendixAforfurtherrestrictionsontheformatofarticlesinsomeusesofNNTP.
Anarticleconsistsoftwoparts:theheadersandthebody.
Theyareseparatedbyasingleemptyline,orinotherwordsbytwoconsecutiveCRLFpairs(ifthereismorethanoneemptyline,thesecondandsubsequentonesarepartofthebody).
InordertomeetthegeneralrequirementsofNNTP,anarticleMUSTNOTincludetheoctetNUL,MUSTNOTcontaintheoctetsLFandCRotherthanaspartofaCRLFpair,andMUSTendwithaCRLFpair.
Thisspecificationputsnofurtherrestrictionsonthebody;inparticular,itMAYbeempty.
Theheadersofanarticleconsistofoneormoreheaderlines.
Eachheaderlineconsistsofaheadername,acolon,aspace,theheadercontent,andaCRLF,inthatorder.
ThenameconsistsofoneormoreprintableUS-ASCIIcharactersotherthancolonand,forthepurposesofthisspecification,isnotcasesensitive.
ThereMAYbemorethanoneheaderlinewiththesamename.
ThecontentMUSTNOTcontainCRLF;itMAYbeempty.
Aheadermaybe"folded";thatis,aCRLFpairmaybeplacedbeforeanyTABorspaceintheline.
ThereMUSTstillbesomeotheroctetbetweenanytwoCRLFpairsinaheaderline.
(Notethatfoldingmeansthattheheaderlineoccupiesmorethanonelinewhendisplayedortransmitted;nevertheless,itisstillreferredtoas"a"headerline.
)Thepresenceorabsenceoffoldingdoesnotaffectthemeaningoftheheaderline;thatis,theCRLFpairsintroducedbyfoldingarenotconsideredpartoftheheadercontent.
HeaderlinesSHOULDNOTbefoldedbeforethespaceafterthecolonthatfollowstheheadernameandSHOULDincludeatleastoneoctetotherthan%x09or%x20betweenCRLFpairs.
However,ifanarticlethatfailstosatisfythisrequirementhasbeenreceivedfromelsewhere,clientsandserversMAYtransferittoeachotherwithoutre-foldingit.
FeatherStandardsTrack[Page24]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ThecontentofaheaderSHOULDbeinUTF-8.
However,ifanimplementationreceivesanarticlefromelsewherethatusesoctetsintherange128to255insomeothermanner,itMAYpassittoaclientorserverwithoutmodification.
Therefore,implementationsMUSTbepreparedtoreceivesuchheaders,anddataderivedfromthem(e.
g.
,intheresponsesfromtheOVERcommand,Section8.
3),andMUSTNOTassumethattheyarealwaysUTF-8.
Anyexternalprocessingofthoseheaders,includingidentifyingtheencodingused,isoutsidethescopeofthisdocument.
EacharticleMUSThaveauniquemessage-id;twoarticlesofferedbyanNNTPserverMUSTNOThavethesamemessage-id.
Forthepurposesofthisspecification,message-idsareopaquestringsthatMUSTmeetthefollowingrequirements:oAmessage-idMUSTbeginwith"",andMUSTNOTcontainthelatterexceptattheend.
oAmessage-idMUSTbebetween3and250octetsinlength.
oAmessage-idMUSTNOTcontainoctetsotherthanprintableUS-ASCIIcharacters.
Twomessage-idsarethesameifandonlyiftheyconsistofthesamesequenceofoctets.
Thisspecificationdoesnotdescribehowthemessage-idofanarticleisdetermined.
Iftheserverdoesnothaveanywaytodetermineamessage-idfromthearticleitself,itMUSTsynthesizeone(thisspecificationdoesnotrequirethatthearticlebechangedasaresult).
SeealsoAppendixA.
2.
4.
TheWILDMATFormatTheWILDMATformatdescribedhereisbasedontheversionfirstdevelopedbyRichSalz[SALZ1992],whichwasinturnderivedfromtheformatusedintheUNIX"find"commandtoarticulatefilenames.
ItwasdevelopedtoprovideauniformmechanismformatchingpatternsinthesamemannerthattheUNIXshellmatchesfilenames.
FeatherStandardsTrack[Page25]RFC3977NetworkNewsTransferProtocol(NNTP)October20064.
1.
WildmatSyntaxAwildmatisdescribedbythefollowingABNF[RFC4234]syntax,whichisanextractofthatinSection9.
8.
wildmat=wildmat-patternwildmat-pattern)wildmat-pattern=1*wildmat-itemwildmat-item=wildmat-exact/wildmat-wildwildmat-exact=%x22-29/%x2B/%x2D-3E/%x40-5A/%x5E-7E/UTF8-non-ascii;excludewildmat-wildNote:thecharactersand"]"arenotallowedinwildmats,while*andarealwayswildcards.
Thisshouldnotbeaproblem,sincethesecharacterscannotoccurinnewsgroupnames,whichistheonlycurrentuseofwildmats.
Backslashiscommonlyusedtosuppressthespecialmeaningofcharacters,whereasbracketsareusedtointroducesets.
However,theseusagesarenotuniversal,andinterpretationofthesecharactersinthecontextofUTF-8stringsispotentiallycomplexanddiffersfromexistingpractice,sotheywereomittedfromthisspecification.
Afutureextensiontothisspecificationmayprovidesemanticsforthesecharacters.
4.
2.
WildmatSemanticsAwildmatistestedagainstastringandeithermatchesordoesnotmatch.
Todothis,eachconstituentismatchedagainstthestring,andtherightmostpatternthatmatchesisidentified.
Ifthatisnotprecededwith"!
",thewholewildmatmatches.
Ifitisprecededby"!
",orifnomatches,thewholewildmatdoesnotmatch.
Forexample,considerthewildmat"a*,!
*b,*c*":oThestring"aaa"matchesbecausetherightmostmatchiswith"a*".
oThestring"abb"doesnotmatchbecausetherightmostmatchiswith"*b".
oThestring"ccb"matchesbecausetherightmostmatchiswith"*c*".
oThestring"xxx"doesnotmatchbecausenomatches.
Amatchesastringifthestringcanbebrokenintocomponents,eachofwhichmatchesthecorrespondinginthepattern.
Thematchesmustbeinthesameorder,andthewholeFeatherStandardsTrack[Page26]RFC3977NetworkNewsTransferProtocol(NNTP)October2006stringmustbeusedinthematch.
Thepatternis"anchored";thatis,thefirstandlastcharactersinthestringmustmatchthefirstandlastitem,respectively(unlessthatitemisanasteriskmatchingzerocharacters).
Amatchesthesamecharacter(whichmaybemorethanoneoctetinUTF-8).
""matchesexactlyonecharacter(whichmaybemorethanoneoctet).
"*"matcheszeroormorecharacters.
Itcanmatchanemptystring,butitcannotmatchasubsequenceofaUTF-8sequencethatisnotalignedtothecharacterboundaries.
4.
3.
ExtensionsAnNNTPserverorextensionMAYextendthesyntaxorsemanticsofwildmatsprovidedthatallwildmatsthatmeettherequirementsofSection4.
1havethemeaningascribedtothembySection4.
2.
Futureeditionsofthisdocumentmayalsoextendwildmats.
4.
4.
ExamplesIntheseexamples,$and@areusedtorepresentthetwooctets%xC2and%xA3,respectively;$@isthustheUTF-8encodingforthepoundsterlingsymbol,shownas#inthedescriptions.
WildmatDescriptionofstringsthatmatchabcTheonestring"abc"abc,defThetwostrings"abc"and"def"$@Theonecharacterstring"#"a*Anystringthatbeginswith"a"a*bAnystringthatbeginswith"a"andendswith"b"a*,*bAnystringthatbeginswith"a"orendswith"b"a*,!
*bAnystringthatbeginswith"a"anddoesnotendwith"b"a*,!
*b,c*Anystringthatbeginswith"a"anddoesnotendwith"b",andanystringthatbeginswith"c"nomatterwhatitendswitha*,c*,!
*bAnystringthatbeginswith"a"or"c"anddoesnotendwith"b"a*Anystringwith"a"asitssecondcharactera*Anystringwith"a"asitsthirdcharacter*aAnystringwith"a"asitspenultimatecharacter*aAnystringwith"a"asitsantepenultimatecharacterFeatherStandardsTrack[Page27]RFC3977NetworkNewsTransferProtocol(NNTP)October20065.
SessionAdministrationCommands5.
1.
InitialConnection5.
1.
1.
UsageThiscommandMUSTNOTbepipelined.
Responses[1]200Serviceavailable,postingallowed201Serviceavailable,postingprohibited400Servicetemporarilyunavailable[2]502Servicepermanentlyunavailable[2][1]Thesearetheonlyvalidresponsecodesfortheinitialgreeting;theserverMUSTnotreturnanyothergenericresponsecode.
[2]Followinga400or502response,theserverMUSTimmediatelyclosetheconnection.
5.
1.
2.
DescriptionThereisnocommandpresentedbytheclientuponinitialconnectiontotheserver.
TheserverMUSTpresentanappropriateresponsecodeasagreetingtotheclient.
Thisresponseinformstheclientwhetherserviceisavailableandwhethertheclientispermittedtopost.
IftheserverwillacceptfurthercommandsfromtheclientincludingPOST,theserverMUSTpresenta200greetingcode.
Iftheserverwillacceptfurthercommandsfromtheclient,buttheclientisnotauthorizedtopostarticlesusingthePOSTcommand,theserverMUSTpresenta201greetingcode.
Otherwise,theserverMUSTpresenta400or502greetingcodeandthenimmediatelyclosetheconnection.
400SHOULDbeusediftheissueisonlytemporary(forexample,becauseofload)andtheclientcanexpecttobeabletoconnectsuccessfullyatsomepointinthefuturewithoutmakinganychanges.
502MUSTbeusediftheclientisnotpermittedunderanycircumstancestointeractwiththeserver,andMAYbeusediftheserverhasinsufficientinformationtodeterminewhethertheissueistemporaryorpermanent.
Note:thedistinctionbetweenthe200and201responsecodeshasturnedoutinpracticetobeinsufficient;forexample,someserversdonotallowpostinguntiltheclienthasauthenticated,whileotherclientsassumethata201responsemeansthatpostingwillneverbepossibleevenafterauthentication.
Therefore,clientsSHOULDuseFeatherStandardsTrack[Page28]RFC3977NetworkNewsTransferProtocol(NNTP)October2006theCAPABILITIEScommand(Section5.
2)ratherthanrelyonthisresponse.
5.
1.
3.
ExamplesExampleofanormalconnectionfromanauthorizedclientthatthenterminatesthesession(seeSection5.
4):[Initialconnectionset-upcompleted.
][S]200NNTPServiceReady,postingpermitted[C]QUIT[S]205NNTPServiceexitsnormally[Serverclosesconnection.
]Exampleofanormalconnectionfromanauthorizedclientthatisnotpermittedtopost,whichalsoimmediatelyterminatesthesession:[Initialconnectionset-upcompleted.
][S]201NNTPServiceReady,postingprohibited[C]QUIT[S]205NNTPServiceexitsnormally[Serverclosesconnection.
]Exampleofanormalconnectionfromanunauthorizedclient:[Initialconnectionset-upcompleted.
][S]502NNTPServicepermanentlyunavailable[Serverclosesconnection.
]Exampleofaconnectionfromaclientiftheserverisunabletoprovideservice:[Initialconnectionset-upcompleted.
][S]400NNTPServicetemporarilyunavailable[Serverclosesconnection.
]5.
2.
CAPABILITIES5.
2.
1.
UsageThiscommandismandatory.
SyntaxCAPABILITIES[keyword]Responses101Capabilitylistfollows(multi-line)FeatherStandardsTrack[Page29]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Parameterskeywordadditionalfeature,seedescription5.
2.
2.
DescriptionTheCAPABILITIEScommandallowsaclienttodeterminethecapabilitiesoftheserveratanygiventime.
ThiscommandMAYbeissuedatanytime;theserverMUSTNOTrequireittobeissuedinordertomakeuseofanycapability.
TheresponsegeneratedbythiscommandMAYchangeduringasessionbecauseofotherstateinformation(which,inturn,maybechangedbytheeffectsofothercommandsorbyexternalevents).
AnNNTPclientisonlyabletogetthecurrentandcorrectinformationconcerningavailablecapabilitiesatanypointduringasessionbyissuingaCAPABILITIEScommandatthatpointofthatsessionandprocessingtheresponse.
Thecapabilitylistisreturnedasamulti-linedatablockfollowingthe101responsecode.
Eachcapabilityisdescribedbyaseparatecapabilityline.
TheserverMUSTNOTlistthesamecapabilitytwiceintheresponse,evenwithdifferentarguments.
ExceptthattheVERSIONcapabilityMUSTbethefirstline,theorderinwhichthecapabilitylinesappearsisnotsignificant;theserverneednotevenconsistentlyreturnthesameorder.
Whilesomecapabilitiesarelikelytobealwaysavailableorneveravailable,others(notablyextensions)willappearanddisappeardependingonserverstatechangeswithinthesessionoronexternaleventsbetweensessions.
AnNNTPclientMAYcachetheresultsofthiscommand,butMUSTNOTrelyonthecorrectnessofanycachedresults,whetherfromearlierinthissessionorfromaprevioussession,MUSTcopegracefullywiththecachedstatusbeingoutofdate,andSHOULD(ifcachingresults)provideawaytoforcethecachedinformationtoberefreshed.
Furthermore,aclientMUSTNOTusecachedresultsinrelationtosecurity,privacy,andauthenticationextensions.
SeeSection12.
6forfurtherdiscussionofthistopic.
Thekeywordargumentisnotusedbythisspecification.
ItisprovidedsothatextensionsorrevisionstothisspecificationcanincludeextrafeaturesforthiscommandwithoutrequiringtheCAPABILITIEScommandtobeusedtwice(oncetodetermineiftheextrafeaturesareavailable,andasecondtimetomakeuseofthem).
Iftheserverdoesnotrecognisetheargument(anditisakeyword),itMUSTrespondwiththe101responsecodeasiftheargumenthadbeenomitted.
Ifanargumentisprovidedthattheserverdoesrecognise,itMAYusethe101responsecodeorMAYusesomeotherresponsecodeFeatherStandardsTrack[Page30]RFC3977NetworkNewsTransferProtocol(NNTP)October2006(whichwillbedefinedinthespecificationofthatfeature).
Iftheargumentisnotakeyword,the501genericresponsecodeMUSTbereturned.
TheserverMUSTNOTgenerateanyotherresponsecodetotheCAPABILITIEScommand.
5.
2.
3.
ExamplesExampleofaminimalresponse(aread-onlyserver):[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]LISTACTIVENEWSGROUPS[S].
Exampleofaresponsefromaserverthathasarangeoffacilitiesandthatalsodescribesitself:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]IHAVE[S]POST[S]NEWNEWS[S]LISTACTIVENEWSGROUPSACTIVE.
TIMESOVERVIEW.
FMT[S]IMPLEMENTATIONINN4.
22004-12-25[S]OVERMSGID[S]STREAMING[S]XSECRET[S].
ExampleofaserverthatsupportsmorethanoneversionofNNTP:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION23[S]READER[S]LISTACTIVENEWSGROUPS[S].
FeatherStandardsTrack[Page31]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofaclientattemptingtouseafeatureoftheCAPABILITIEScommandthattheserverdoesnotsupport:[C]CAPABILITIESAUTOUPDATE[S]101Capabilitylist:[S]VERSION2[S]READER[S]IHAVE[S]LISTACTIVENEWSGROUPSOVERVIEW.
FMTHEADERS[S]OVERMSGID[S]HDR[S]NEWNEWS[S].
5.
3.
MODEREADER5.
3.
1.
UsageIndicatingcapability:MODE-READERThiscommandMUSTNOTbepipelined.
SyntaxMODEREADERResponses200Postingallowed201Postingprohibited502Readingservicepermanentlyunavailable[1][1]Followinga502responsetheserverMUSTimmediatelyclosetheconnection.
5.
3.
2.
DescriptionTheMODEREADERcommandinstructsamode-switchingservertoswitchmodes,asdescribedinSection3.
4.
2.
Iftheserverismode-switching,itswitchesfromitstransitmodetoitsreadermode,indicatingthisbychangingthecapabilitylistaccordingly.
ItMUSTthenreturna200or201responsewiththesamemeaningasfortheinitialgreeting(asdescribedinSection5.
1.
1).
Notethattheresponseneednotbethesameasthatpresentedduringtheinitialgreeting.
TheclientMUSTNOTissueMODEREADERmorethanonceinasessionorafteranysecurityorprivacycommandsareissued.
WhentheMODEREADERcommandisissued,theserverMAYresetitsstatetothatimmediatelyaftertheinitialconnectionbeforeswitchingmode.
FeatherStandardsTrack[Page32]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Iftheserverisnotmode-switching,thenthefollowingapply:oIfitadvertisestheREADERcapability,itMUSTreturna200or201responsewiththesamemeaningasfortheinitialgreeting;inthiscase,thecommandMUSTNOTaffecttheserverstateinanyway.
oIfitdoesnotadvertisetheREADERcapability,itMUSTreturna502responseandthenimmediatelyclosetheconnection.
5.
3.
3.
ExamplesExampleofuseoftheMODEREADERcommandonatransit-onlyserver(whichthereforedoesnotprovidingreadingfacilities):[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]IHAVE[S].
[C]MODEREADER[S]502Transitserviceonly[Serverclosesconnection.
]ExampleofuseoftheMODEREADERcommandonaserverthatprovidesreadingfacilities:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]LISTACTIVENEWSGROUPS[S].
[C]MODEREADER[S]200Readermode,postingpermitted[C]IHAVE[S]500Permissiondenied[C]GROUPmisc.
test[S]211123430002343002322misc.
testNotethatinbothofthesesituations,theclientSHOULDNOTuseMODEREADER.
FeatherStandardsTrack[Page33]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofuseoftheMODEREADERcommandonamode-switchingserver:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]IHAVE[S]MODE-READER[S].
[C]MODEREADER[S]200Readermode,postingpermitted[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]NEWNEWS[S]LISTACTIVENEWSGROUPS[S]STARTTLS[S].
Inthiscase,theserveroffers(butdoesnotrequire)TLSprivacyinitsreadingmodebutnotinitstransitmode.
ExampleofuseoftheMODEREADERcommandwheretheclientisnotpermittedtopost:[C]MODEREADER[S]201NNTPServiceReady,postingprohibited5.
4.
QUIT5.
4.
1.
UsageThiscommandismandatory.
SyntaxQUITResponses205Connectionclosing5.
4.
2.
DescriptionTheclientusestheQUITcommandtoterminatethesession.
TheserverMUSTacknowledgetheQUITcommandandthenclosetheconnectiontotheclient.
ThisisthepreferredmethodforaclienttoindicatethatithasfinishedallofitstransactionswiththeNNTPserver.
FeatherStandardsTrack[Page34]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Ifaclientsimplydisconnects(oriftheconnectiontimesoutorsomeotherfaultoccurs),theserverMUSTgracefullyceaseitsattemptstoservicetheclient,disconnectingfromitsendifnecessary.
TheserverMUSTNOTgenerateanyresponsecodetotheQUITcommandotherthan205or,ifanyargumentsareprovided,501.
5.
4.
3.
Examples[C]QUIT[S]205closingconnection[Serverclosesconnection.
]6.
ArticlePostingandRetrievalNews-readingclientshaveavailableavarietyofmechanismstoretrievearticlesviaNNTP.
Thenewsarticlesarestoredandindexedusingthreetypesofkeys.
Thefirsttypeofkeyisthemessage-idofanarticleandisgloballyunique.
Thesecondtypeofkeyiscomposedofanewsgroupnameandanarticlenumberwithinthatnewsgroup.
Onaparticularserver,thereMUSTonlybeonearticlewithagivennumberwithinanynewsgroup,andanarticleMUSTNOThavetwodifferentnumbersinthesamenewsgroup.
Anarticlecanbecross-postedtomultiplenewsgroups,sotheremaybemultiplekeysthatpointtothesamearticleonthesameserver;theseMAYhavedifferentnumbersineachnewsgroup.
However,thistypeofkeyisnotrequiredtobegloballyunique,sothesamekeyMAYrefertodifferentarticlesondifferentservers.
(Notethattheterms"group"and"newsgroup"areequivalent.
)Thefinaltypeofkeyisthearrivaltimestamp,givingthetimethatthearticlearrivedattheserver.
TheserverMUSTensurethatarticlenumbersareissuedinorderofarrivaltimestamp;thatis,articlesarrivinglaterMUSThavehighernumbersthanthosethatarriveearlier.
TheserverSHOULDallocatethenextsequentialunusednumbertoeachnewarticle.
ArticlenumbersMUSTliebetween1and2,147,483,647,inclusive.
TheclientandserverMAYuseleadingzeroesinspecifyingarticlenumbersbutMUSTNOTusemorethan16digits.
Insomesituations,thevaluezeroreplacesanarticlenumbertoshowsomespecialsituation.
Notethatitislikelythatthearticlenumberlimitof2,147,483,647willbeincreasedbyafuturerevisionorextensiontothisspecification.
WhileserversMUSTNOTsendarticlenumbersgreaterthanthiscurrentlimit,clientandserverdevelopersareadvisedtoFeatherStandardsTrack[Page35]RFC3977NetworkNewsTransferProtocol(NNTP)October2006useinternalstructuresanddatatypescapableofhandlinglargervaluesinanticipationofsuchachange.
6.
1.
GroupandArticleSelectionThefollowingcommandsareusedtosetthe"currentlyselectednewsgroup"andthe"currentarticlenumber",whichareusedbyvariouscommands.
AtthestartofanNNTPsession,bothofthesevaluesaresettothespecialvalue"invalid".
6.
1.
1.
GROUP6.
1.
1.
1.
UsageIndicatingcapability:READERSyntaxGROUPgroupResponses211numberlowhighgroupGroupsuccessfullyselected411NosuchnewsgroupParametersgroupNameofnewsgroupnumberEstimatednumberofarticlesinthegrouplowReportedlowwatermarkhighReportedhighwatermark6.
1.
1.
2.
DescriptionTheGROUPcommandselectsanewsgroupasthecurrentlyselectednewsgroupandreturnssummaryinformationaboutit.
Therequiredargumentisthenameofthenewsgrouptobeselected(e.
g.
,"news.
software.
nntp").
AlistofvalidnewsgroupsmaybeobtainedbyusingtheLISTACTIVEcommand(seeSection7.
6.
3).
Thesuccessfulselectionresponsewillreturnthearticlenumbersofthefirstandlastarticlesinthegroupatthemomentofselection(thesenumbersarereferredtoasthe"reportedlowwatermark"andthe"reportedhighwatermark")andanestimateofthenumberofarticlesinthegroupcurrentlyavailable.
Ifthegroupisnotempty,theestimateMUSTbeatleasttheactualnumberofarticlesavailableandMUSTbenogreaterthanonemorethanthedifferencebetweenthereportedlowandhighwatermarks.
(SomeimplementationswillactuallycountthenumberofarticlesFeatherStandardsTrack[Page36]RFC3977NetworkNewsTransferProtocol(NNTP)October2006currentlystored.
Otherswilljustsubtractthelowwatermarkfromthehighwatermarkandaddonetogetanestimate.
)Ifthegroupisempty,oneofthefollowingthreesituationswilloccur.
ClientsMUSTacceptallthreecases;serversMUSTNOTrepresentanemptygroupinanyotherway.
oThehighwatermarkwillbeonelessthanthelowwatermark,andtheestimatedarticlecountwillbezero.
ServersSHOULDusethismethodtoshowanemptygroup.
Thisistheonlytimethatthehighwatermarkcanbelessthanthelowwatermark.
oAllthreenumberswillbezero.
oThehighwatermarkisgreaterthanorequaltothelowwatermark.
Theestimatedarticlecountmightbezeroornon-zero;ifitisnon-zero,thesamerequirementsapplyasforanon-emptygroup.
ThesetofarticlesinagroupmaychangeaftertheGROUPcommandiscarriedout:oArticlesmayberemovedfromthegroup.
oArticlesmaybereinstatedinthegroupwiththesamearticlenumber,butthosearticlesMUSThavenumbersnolessthanthereportedlowwatermark(notethatthisisareinstatementofthepreviousarticle,notanewarticlereusingthenumber).
oNewarticlesmaybeaddedwitharticlenumbersgreaterthanthereportedhighwatermark.
(Ifanarticlethatwastheonewiththehighestnumberhasbeenremovedandthehighwatermarkhasbeenadjustedaccordingly,thenextnewarticlewillnothavethenumberonegreaterthanthereportedhighwatermark.
)Exceptwhenthegroupisemptyandallthreenumbersarezero,wheneverasubsequentGROUPcommandforthesamenewsgroupisissued,eitherbythesameclientoradifferentclient,thereportedlowwatermarkintheresponseMUSTbenolessthanthatinanypreviousresponseforthatnewsgroupinthissession,anditSHOULDbenolessthanthatinanypreviousresponseforthatnewsgroupeversenttoanyclient.
AnyfailuretomeetthelatterconditionSHOULDbetransientonly.
Theclientmaymakeuseofthelowwatermarktoremoveallrememberedinformationaboutarticleswithlowernumbers,asthesewillneverrecur.
Thisincludesthesituationwhenthehighwatermarkisonelessthanthelowwatermark.
Nosimilarassumptioncanbemadeaboutthehighwatermark,asthiscanFeatherStandardsTrack[Page37]RFC3977NetworkNewsTransferProtocol(NNTP)October2006decreaseifanarticleisremovedandthenincreaseagainifitisreinstatedorifnewarticlesarrive.
Whenavalidgroupisselectedbymeansofthiscommand,thecurrentlyselectednewsgroupMUSTbesettothatgroup,andthecurrentarticlenumberMUSTbesettothefirstarticleinthegroup(thisappliesevenifthegroupisalreadythecurrentlyselectednewsgroup).
Ifanemptynewsgroupisselected,thecurrentarticlenumberismadeinvalid.
Ifaninvalidgroupisspecified,thecurrentlyselectednewsgroupandcurrentarticlenumberMUSTNOTbechanged.
TheGROUPorLISTGROUPcommand(seeSection6.
1.
2)MUSTbeusedbyaclient,andasuccessfulresponsereceived,beforeanyothercommandisusedthatdependsonthevalueofthecurrentlyselectednewsgrouporcurrentarticlenumber.
Ifthegroupspecifiedisnotavailableontheserver,a411responseMUSTbereturned.
6.
1.
1.
3.
ExamplesExampleforagroupknowntotheserver:[C]GROUPmisc.
test[S]211123430002343002322misc.
testExampleforagroupunknowntotheserver:[C]GROUPexample.
is.
sob.
bradner.
or.
barber[S]411example.
is.
sob.
bradner.
or.
barberisunknownExampleofanemptygroupusingthepreferredresponse:[C]GROUPexample.
currently.
empty.
newsgroup[S]211040003999example.
currently.
empty.
newsgroupExampleofanemptygroupusinganalternativeresponse:[C]GROUPexample.
currently.
empty.
newsgroup[S]211000example.
currently.
empty.
newsgroupExampleofanemptygroupusingadifferentalternativeresponse:[C]GROUPexample.
currently.
empty.
newsgroup[S]211040004321example.
currently.
empty.
newsgroupFeatherStandardsTrack[Page38]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Examplereselectingthecurrentlyselectednewsgroup:[C]GROUPmisc.
test[S]2111234234567misc.
test[C]STAT444[S]223444retrieved[C]GROUPmisc.
test[S]2111234234567misc.
test[C]STAT[S]223234retrieved6.
1.
2.
LISTGROUP6.
1.
2.
1.
UsageIndicatingcapability:READERSyntaxLISTGROUP[group[range]]Responses211numberlowhighgroupArticlenumbersfollow(multi-line)411Nosuchnewsgroup412Nonewsgroupselected[1]ParametersgroupNameofnewsgrouprangeRangeofarticlestoreportnumberEstimatednumberofarticlesinthegrouplowReportedlowwatermarkhighReportedhighwatermark[1]The412responsecanonlyoccurifnogrouphasbeenspecified.
6.
1.
2.
2.
DescriptionTheLISTGROUPcommandselectsanewsgroupinthesamemannerastheGROUPcommand(seeSection6.
1.
1)butalsoprovidesalistofarticlenumbersinthenewsgroup.
Ifnogroupisspecified,thecurrentlyselectednewsgroupisused.
Onsuccess,alistofarticlenumbersisreturnedasamulti-linedatablockfollowingthe211responsecode(theargumentsontheinitialresponselinearethesameasfortheGROUPcommand).
Thelistcontainsonenumberperlineandisinnumericalorder.
Itlistspreciselythosearticlesthatexistinthegroupatthemomentofselection(therefore,anemptygroupproducesanemptylist).
Iftheoptionalrangeargumentisspecified,onlyarticleswithintheFeatherStandardsTrack[Page39]RFC3977NetworkNewsTransferProtocol(NNTP)October2006rangeareincludedinthelist(therefore,thelistMAYbeemptyevenifthegroupisnot).
Therangeargumentmaybeanyofthefollowing:oAnarticlenumber.
oAnarticlenumberfollowedbyadashtoindicateallfollowing.
oAnarticlenumberfollowedbyadashfollowedbyanotherarticlenumber.
Inthelastcase,ifthesecondnumberislessthanthefirstnumber,thentherangecontainsnoarticles.
Omittingtherangeisequivalenttotherange1-beingspecified.
Ifthegroupspecifiedisnotavailableontheserver,a411responseMUSTbereturned.
Ifnogroupisspecifiedandthecurrentlyselectednewsgroupisinvalid,a412responseMUSTbereturned.
Exceptthatthegroupargumentisoptional,thatarangeargumentcanbespecified,andthatamulti-linedatablockfollowsthe211responsecode,theLISTGROUPcommandisidenticaltotheGROUPcommand.
Inparticular,whensuccessful,thecommandsetsthecurrentarticlenumbertothefirstarticleinthegroup,ifany,evenifthisisnotwithintherangespecifiedbythesecondargument.
NotethattherangeargumentisanewfeatureinthisspecificationandserversthatdonotsupportCAPABILITIES(andthereforedonotconformtothisspecification)areunlikelytosupportit.
6.
1.
2.
3.
ExamplesExampleofLISTGROUPbeingusedtoselectagroup:[C]LISTGROUPmisc.
test[S]211200030002343002322misc.
testlistfollows[S]3000234[S]3000237[S]3000238[S]3000239[S]3002322[S].
FeatherStandardsTrack[Page40]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofLISTGROUPonanemptygroup:[C]LISTGROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgrouplistfollows[S].
ExampleofLISTGROUPonavalid,currentlyselectednewsgroup:[C]GROUPmisc.
test[S]211200030002343002322misc.
test[C]LISTGROUP[S]211200030002343002322misc.
testlistfollows[S]3000234[S]3000237[S]3000238[S]3000239[S]3002322[S].
ExampleofLISTGROUPwitharange:[C]LISTGROUPmisc.
test3000238-3000248[S]211200030002343002322misc.
testlistfollows[S]3000238[S]3000239[S].
ExampleofLISTGROUPwithanemptyrange:[C]LISTGROUPmisc.
test12345678-[S]211200030002343002322misc.
testlistfollows[S].
ExampleofLISTGROUPwithaninvalidrange:[C]LISTGROUPmisc.
test9999-111[S]211200030002343002322misc.
testlistfollows[S].
FeatherStandardsTrack[Page41]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
1.
3.
LAST6.
1.
3.
1.
UsageIndicatingcapability:READERSyntaxLASTResponses223nmessage-idArticlefound412Nonewsgroupselected420Currentarticlenumberisinvalid422NopreviousarticleinthisgroupParametersnArticlenumbermessage-idArticlemessage-id6.
1.
3.
2.
DescriptionIfthecurrentlyselectednewsgroupisvalid,thecurrentarticlenumberMUSTbesettothepreviousarticleinthatnewsgroup(thatis,thehighestexistingarticlenumberlessthanthecurrentarticlenumber).
Ifsuccessful,aresponseindicatingthenewcurrentarticlenumberandthemessage-idofthatarticleMUSTbereturned.
Noarticletextissentinresponsetothiscommand.
ThereMAYbenopreviousarticleinthegroup,althoughthecurrentarticlenumberisnotthereportedlowwatermark.
ThereMUSTNOTbeapreviousarticlewhenthecurrentarticlenumberisthereportedlowwatermark.
Becausearticlescanberemovedandadded,theresultsofmultipleLASTandNEXTcommandsMAYnotbeconsistentoverthelifeofaparticularNNTPsession.
Ifthecurrentarticlenumberisalreadythefirstarticleofthenewsgroup,a422responseMUSTbereturned.
Ifthecurrentarticlenumberisinvalid,a420responseMUSTbereturned.
Ifthecurrentlyselectednewsgroupisinvalid,a412responseMUSTbereturned.
Inallthreecases,thecurrentlyselectednewsgroupandcurrentarticlenumberMUSTNOTbealtered.
FeatherStandardsTrack[Page42]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
1.
3.
3.
ExamplesExampleofasuccessfularticleretrievalusingLAST:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]NEXT[S]2233000237retrieved[C]LAST[S]2233000234retrievedExampleofanattempttoretrieveanarticlewithouthavingselectedagroup(viatheGROUPcommand)first:[Assumescurrentlyselectednewsgroupisinvalid.
][C]LAST[S]412nonewsgroupselectedExampleofanattempttoretrieveanarticleusingtheLASTcommandwhenthecurrentarticlenumberisthatofthefirstarticleinthegroup:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]LAST[S]422NopreviousarticletoretrieveExampleofanattempttoretrieveanarticleusingtheLASTcommandwhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]LAST[S]420NocurrentarticleselectedFeatherStandardsTrack[Page43]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
1.
4.
NEXT6.
1.
4.
1.
UsageIndicatingcapability:READERSyntaxNEXTResponses223nmessage-idArticlefound412Nonewsgroupselected420Currentarticlenumberisinvalid421NonextarticleinthisgroupParametersnArticlenumbermessage-idArticlemessage-id6.
1.
4.
2.
DescriptionIfthecurrentlyselectednewsgroupisvalid,thecurrentarticlenumberMUSTbesettothenextarticleinthatnewsgroup(thatis,thelowestexistingarticlenumbergreaterthanthecurrentarticlenumber).
Ifsuccessful,aresponseindicatingthenewcurrentarticlenumberandthemessage-idofthatarticleMUSTbereturned.
Noarticletextissentinresponsetothiscommand.
Ifthecurrentarticlenumberisalreadythelastarticleofthenewsgroup,a421responseMUSTbereturned.
Inallotheraspects(apart,ofcourse,fromthelackof422response),thiscommandisidenticaltotheLASTcommand(Section6.
1.
3).
6.
1.
4.
3.
ExamplesExampleofasuccessfularticleretrievalusingNEXT:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]NEXT[S]2233000237retrievedFeatherStandardsTrack[Page44]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanattempttoretrieveanarticlewithouthavingselectedagroup(viatheGROUPcommand)first:[Assumescurrentlyselectednewsgroupisinvalid.
][C]NEXT[S]412nonewsgroupselectedExampleofanattempttoretrieveanarticleusingtheNEXTcommandwhenthecurrentarticlenumberisthatofthelastarticleinthegroup:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]STAT3002322[S]2233002322retrieved[C]NEXT[S]421NonextarticletoretrieveExampleofanattempttoretrieveanarticleusingtheNEXTcommandwhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]NEXT[S]420Nocurrentarticleselected6.
2.
RetrievalofArticlesandArticleSectionsTheARTICLE,BODY,HEAD,andSTATcommandsareverysimilar.
Theydifferonlyinthepartsofthearticlethatarepresentedtotheclientandinthesuccessfulresponsecode.
TheARTICLEcommandisdescribedhereinfull,whiletheotherthreecommandsaredescribedintermsofthedifferences.
AsspecifiedinSection3.
6,anarticleconsistsoftwoparts:thearticleheadersandthearticlebody.
Whenrespondingtooneofthesecommands,theserverMUSTpresenttheentirearticleorappropriatepartandMUSTNOTattempttoalterortranslateitinanyway.
FeatherStandardsTrack[Page45]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
2.
1.
ARTICLE6.
2.
1.
1.
UsageIndicatingcapability:READERSyntaxARTICLEmessage-idARTICLEnumberARTICLEResponsesFirstform(message-idspecified)2200|nmessage-idArticlefollows(multi-line)430Noarticlewiththatmessage-idSecondform(articlenumberspecified)220nmessage-idArticlefollows(multi-line)412Nonewsgroupselected423NoarticlewiththatnumberThirdform(currentarticlenumberused)220nmessage-idArticlefollows(multi-line)412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersnumberRequestedarticlenumbernReturnedarticlenumbermessage-idArticlemessage-id6.
2.
1.
2.
DescriptionTheARTICLEcommandselectsanarticleaccordingtotheargumentsandpresentstheentirearticle(thatis,theheaders,anemptyline,andthebody,inthatorder)totheclient.
Thecommandhasthreeforms.
Inthefirstform,amessage-idisspecified,andtheserverpresentsthearticlewiththatmessage-id.
Inthiscase,theserverMUSTNOTalterthecurrentlyselectednewsgrouporcurrentarticlenumber.
Thisisbothtofacilitatethepresentationofarticlesthatmaybereferencedwithinanotherarticlebeingread,andbecauseofthesemanticdifficultiesofdeterminingthepropersequenceandmembershipofanarticlethatmayhavebeencross-postedtomorethanonenewsgroup.
FeatherStandardsTrack[Page46]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Intheresponse,thearticlenumberMUSTbereplacedwithzero,unlessthereisacurrentlyselectednewsgroupandthearticleispresentinthatgroup,inwhichcasetheserverMAYusethearticle'snumberinthatgroup.
(Theserverisnotrequiredtodeterminewhetherthearticleisinthecurrentlyselectednewsgroupor,ifso,whatarticlenumberithas;theclientMUSTalwaysbepreparedforzerotobespecified.
)TheserverMUSTNOTprovideanarticlenumberunlessuseofthatnumberinasecondARTICLEcommandimmediatelyfollowingthisonewouldreturnthesamearticle.
Eveniftheserverchoosestoreturnarticlenumbersinthesecircumstances,itneednotdosoconsistently;itMAYreturnzerotoanysuchcommand(alsoseetheSTATexamples,Section6.
2.
4.
3).
Inthesecondform,anarticlenumberisspecified.
Ifthereisanarticlewiththatnumberinthecurrentlyselectednewsgroup,theserverMUSTsetthecurrentarticlenumbertothatnumber.
Inthethirdform,thearticleindicatedbythecurrentarticlenumberinthecurrentlyselectednewsgroupisused.
NotethatapreviouslyvalidarticlenumberMAYbecomeinvalidifthearticlehasbeenremoved.
ApreviouslyinvalidarticlenumberMAYbecomevalidifthearticlehasbeenreinstated,butthisarticlenumberMUSTbenolessthanthereportedlowwatermarkforthatgroup.
TheserverMUSTNOTchangethecurrentlyselectednewsgroupasaresultofthiscommand.
TheserverMUSTNOTchangethecurrentarticlenumberexceptwhenanarticlenumberargumentwasprovidedandthearticleexists;inparticular,itMUSTNOTchangeitfollowinganunsuccessfulresponse.
Sincethemessage-idisuniqueforeacharticle,itmaybeusedbyaclienttoskipduplicatedisplaysofarticlesthathavebeenpostedmorethanonce,ortomorethanonenewsgroup.
Thearticleisreturnedasamulti-linedatablockfollowingthe220responsecode.
Iftheargumentisamessage-idandnosucharticleexists,a430responseMUSTbereturned.
Iftheargumentisanumberorisomittedandthecurrentlyselectednewsgroupisinvalid,a412responseMUSTbereturned.
Iftheargumentisanumberandthatarticledoesnotexistinthecurrentlyselectednewsgroup,a423responseMUSTbereturned.
Iftheargumentisomittedandthecurrentarticlenumberisinvalid,a420responseMUSTbereturned.
FeatherStandardsTrack[Page47]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
2.
1.
3.
ExamplesExampleofasuccessfulretrievalofanarticle(explicitlynotusinganarticlenumber):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]ARTICLE[S]2203000234[S]Path:pathost!
demo!
whitehouse!
not-for-mail[S]From:"DemoUser"[S]Newsgroups:misc.
test[S]Subject:Iamjustatestarticle[S]Date:6Oct199804:38:40-0500[S]Organization:AnExampleNet,Uncertain,Texas[S]Message-ID:[S][S]Thisisjustatestarticle.
[S].
Exampleofasuccessfulretrievalofanarticlebymessage-id:[C]ARTICLE[S]2200[S]Path:pathost!
demo!
whitehouse!
not-for-mail[S]From:"DemoUser"[S]Newsgroups:misc.
test[S]Subject:Iamjustatestarticle[S]Date:6Oct199804:38:40-0500[S]Organization:AnExampleNet,Uncertain,Texas[S]Message-ID:[S][S]Thisisjustatestarticle.
[S].
Exampleofanunsuccessfulretrievalofanarticlebymessage-id:[C]ARTICLE[S]430NoSuchArticleFoundExampleofanunsuccessfulretrievalofanarticlebynumber:[C]GROUPmisc.
test[S]211123430002343002322news.
groups[C]ARTICLE300256[S]423NoarticlewiththatnumberFeatherStandardsTrack[Page48]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanunsuccessfulretrievalofanarticlebynumberbecausenonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]ARTICLE300256[S]412NonewsgroupselectedExampleofanattempttoretrieveanarticlewhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]ARTICLE[S]420Nocurrentarticleselected6.
2.
2.
HEAD6.
2.
2.
1.
UsageThiscommandismandatory.
SyntaxHEADmessage-idHEADnumberHEADResponsesFirstform(message-idspecified)2210|nmessage-idHeadersfollow(multi-line)430Noarticlewiththatmessage-idSecondform(articlenumberspecified)221nmessage-idHeadersfollow(multi-line)412Nonewsgroupselected423NoarticlewiththatnumberThirdform(currentarticlenumberused)221nmessage-idHeadersfollow(multi-line)412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersnumberRequestedarticlenumbernReturnedarticlenumbermessage-idArticlemessage-idFeatherStandardsTrack[Page49]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
2.
2.
2.
DescriptionTheHEADcommandbehavesidenticallytotheARTICLEcommandexceptthat,ifthearticleexists,theresponsecodeis221insteadof220andonlytheheadersarepresented(theemptylineseparatingtheheadersandbodyMUSTNOTbeincluded).
6.
2.
2.
3.
ExamplesExampleofasuccessfulretrievaloftheheadersofanarticle(explicitlynotusinganarticlenumber):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HEAD[S]2213000234[S]Path:pathost!
demo!
whitehouse!
not-for-mail[S]From:"DemoUser"[S]Newsgroups:misc.
test[S]Subject:Iamjustatestarticle[S]Date:6Oct199804:38:40-0500[S]Organization:AnExampleNet,Uncertain,Texas[S]Message-ID:[S].
Exampleofasuccessfulretrievaloftheheadersofanarticlebymessage-id:[C]HEAD[S]2210[S]Path:pathost!
demo!
whitehouse!
not-for-mail[S]From:"DemoUser"[S]Newsgroups:misc.
test[S]Subject:Iamjustatestarticle[S]Date:6Oct199804:38:40-0500[S]Organization:AnExampleNet,Uncertain,Texas[S]Message-ID:[S].
Exampleofanunsuccessfulretrievaloftheheadersofanarticlebymessage-id:[C]HEAD[S]430NoSuchArticleFoundFeatherStandardsTrack[Page50]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanunsuccessfulretrievaloftheheadersofanarticlebynumber:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HEAD300256[S]423NoarticlewiththatnumberExampleofanunsuccessfulretrievaloftheheadersofanarticlebynumberbecausenonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]HEAD300256[S]412NonewsgroupselectedExampleofanattempttoretrievetheheadersofanarticlewhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]HEAD[S]420Nocurrentarticleselected6.
2.
3.
BODY6.
2.
3.
1.
UsageIndicatingcapability:READERSyntaxBODYmessage-idBODYnumberBODYResponsesFirstform(message-idspecified)2220|nmessage-idBodyfollows(multi-line)430Noarticlewiththatmessage-idSecondform(articlenumberspecified)222nmessage-idBodyfollows(multi-line)412Nonewsgroupselected423NoarticlewiththatnumberFeatherStandardsTrack[Page51]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Thirdform(currentarticlenumberused)222nmessage-idBodyfollows(multi-line)412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersnumberRequestedarticlenumbernReturnedarticlenumbermessage-idArticlemessage-id6.
2.
3.
2.
DescriptionTheBODYcommandbehavesidenticallytotheARTICLEcommandexceptthat,ifthearticleexists,theresponsecodeis222insteadof220andonlythebodyispresented(theemptylineseparatingtheheadersandbodyMUSTNOTbeincluded).
6.
2.
3.
3.
ExamplesExampleofasuccessfulretrievalofthebodyofanarticle(explicitlynotusinganarticlenumber):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]BODY[S]2223000234[S]Thisisjustatestarticle.
[S].
Exampleofasuccessfulretrievalofthebodyofanarticlebymessage-id:[C]BODY[S]2220[S]Thisisjustatestarticle.
[S].
Exampleofanunsuccessfulretrievalofthebodyofanarticlebymessage-id:[C]BODY[S]430NoSuchArticleFoundFeatherStandardsTrack[Page52]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanunsuccessfulretrievalofthebodyofanarticlebynumber:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]BODY300256[S]423NoarticlewiththatnumberExampleofanunsuccessfulretrievalofthebodyofanarticlebynumberbecausenonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]BODY300256[S]412NonewsgroupselectedExampleofanattempttoretrievethebodyofanarticlewhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]BODY[S]420Nocurrentarticleselected6.
2.
4.
STAT6.
2.
4.
1.
UsageThiscommandismandatory.
SyntaxSTATmessage-idSTATnumberSTATResponsesFirstform(message-idspecified)2230|nmessage-idArticleexists430Noarticlewiththatmessage-idSecondform(articlenumberspecified)223nmessage-idArticleexists412Nonewsgroupselected423NoarticlewiththatnumberFeatherStandardsTrack[Page53]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Thirdform(currentarticlenumberused)223nmessage-idArticleexists412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersnumberRequestedarticlenumbernReturnedarticlenumbermessage-idArticlemessage-id6.
2.
4.
2.
DescriptionTheSTATcommandbehavesidenticallytotheARTICLEcommandexceptthat,ifthearticleexists,itisNOTpresentedtotheclientandtheresponsecodeis223insteadof220.
NotethattheresponseisNOTmulti-line.
Thiscommandallowstheclienttodeterminewhetheranarticleexistsand,inthesecondandthirdforms,whatitsmessage-idis,withouthavingtoprocessanarbitraryamountoftext.
6.
2.
4.
3.
ExamplesExampleofSTATonanexistingarticle(explicitlynotusinganarticlenumber):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]STAT[S]2233000234ExampleofSTATonanexistingarticlebymessage-id:[C]STAT[S]2230ExampleofSTATonanarticlenotontheserverbymessage-id:[C]STAT[S]430NoSuchArticleFoundExampleofSTATonanarticlenotintheserverbynumber:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]STAT300256[S]423NoarticlewiththatnumberFeatherStandardsTrack[Page54]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofSTATonanarticlebynumberwhennonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]STAT300256[S]412NonewsgroupselectedExampleofSTATonanarticlewhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]STAT[S]420NocurrentarticleselectedExampleofSTATbymessage-idonaserverthatsometimesreportstheactualarticlenumber:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]STAT[S]2233000234[C]STAT[S]2230[C]STAT[S]2233000234[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]STAT[S]2230[C]GROUPalt.
crossposts[S]2119999111111222222alt.
crossposts[C]STAT[S]223123456[C]STAT[S]223111111ThefirstSTATcommandestablishestheidentityofanarticleinthegroup.
Thesecondandthirdshowthattheservermay,butneednot,givethearticlenumberwhenthemessage-idisspecified.
ThefourthSTATcommandshowsthatzeromustbespecifiedifthearticleisn'tinthecurrentlyselectednewsgroup.
Thefifthshowsthatthenumber,ifprovided,mustbethatrelatingtothecurrentlyselectednewsgroup.
ThelastoneshowsthatthecurrentarticlenumberisstillnotchangedbytheuseofSTATwithamessage-idevenifitreturnsanarticlenumber.
FeatherStandardsTrack[Page55]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
3.
ArticlePostingArticlepostingisdoneinoneoftwoways:individualarticlepostingfromnews-readingclientsusingPOST,andarticletransferfromothernewsserversusingIHAVE.
6.
3.
1.
POST6.
3.
1.
1.
UsageIndicatingcapability:POSTThiscommandMUSTNOTbepipelined.
SyntaxPOSTResponsesInitialresponses340Sendarticletobeposted440PostingnotpermittedSubsequentresponses240ArticlereceivedOK441Postingfailed6.
3.
1.
2.
DescriptionIfpostingisallowed,a340responseMUSTbereturnedtoindicatethatthearticletobepostedshouldbesent.
Ifpostingisprohibitedforsomeinstallation-dependentreason,a440responseMUSTbereturned.
Ifpostingispermitted,thearticleMUSTbeintheformatspecifiedinSection3.
6andMUSTbesentbytheclienttotheserverasamulti-linedatablock(seeSection3.
1.
1).
Thusasingledot(".
")onalineindicatestheendofthetext,andlinesstartingwithadotintheoriginaltexthavethatdotdoubledduringtransmission.
Followingthepresentationoftheterminationsequencebytheclient,theserverMUSTreturnaresponseindicatingsuccessorfailureofthearticletransfer.
Notethatresponsecodes340and440areusedindirectresponsetothePOSTcommandwhile240and441arereturnedafterthearticleissent.
FeatherStandardsTrack[Page56]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Aresponseof240SHOULDindicatethat,barringunforeseenservererrors,thepostedarticlewillbemadeavailableontheserverand/ortransferredtootherservers,asappropriate,possiblyfollowingfurtherprocessing.
Inotherwords,articlesnotwantedbytheserverSHOULDberejectedwitha441response,ratherthanbeingacceptedandthendiscardedsilently.
However,theclientSHOULDNOTassumethatthearticlehasbeensuccessfullytransferredunlessitreceivesanaffirmativeresponsefromtheserverandSHOULDNOTassumethatitisbeingmadeavailabletootherclientswithoutexplicitlychecking(forexample,usingtheSTATcommand).
Ifthesessionisinterruptedbeforetheresponseisreceived,itispossiblethatanaffirmativeresponsewassentbuthasbeenlost.
Therefore,inanysubsequentsession,theclientSHOULDeithercheckwhetherthearticlewassuccessfullypostedbeforeresendingorensurethattheserverwillallocatethesamemessage-idtothenewattempt(seeAppendixA.
2).
Thelatterapproachispreferredsincethearticlemightnothavebeenmadeavailableforreadingyet(forexample,itmayhavetogothroughamoderationprocess).
6.
3.
1.
3.
ExamplesExampleofasuccessfulposting:[C]POST[S]340Inputarticle;endwith.
[C]From:"DemoUser"[C]Newsgroups:misc.
test[C]Subject:Iamjustatestarticle[C]Organization:AnExampleNet[C][C]Thisisjustatestarticle.
[C].
[S]240ArticlereceivedOKExampleofanunsuccessfulposting:[C]POST[S]340Inputarticle;endwith.
[C]From:"DemoUser"[C]Newsgroups:misc.
test[C]Subject:Iamjustatestarticle[C]Organization:AnExampleNet[C][C]Thisisjustatestarticle.
[C].
[S]441PostingfailedFeatherStandardsTrack[Page57]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanattempttopostwhenpostingisnotallowed:[Initialconnectionset-upcompleted.
][S]201NNTPServiceReady,postingprohibited[C]POST[S]440Postingnotpermitted6.
3.
2.
IHAVE6.
3.
2.
1.
UsageIndicatingcapability:IHAVEThiscommandMUSTNOTbepipelined.
SyntaxIHAVEmessage-idResponsesInitialresponses335Sendarticletobetransferred435Articlenotwanted436Transfernotpossible;tryagainlaterSubsequentresponses235ArticletransferredOK436Transferfailed;tryagainlater437Transferrejected;donotretryParametersmessage-idArticlemessage-id6.
3.
2.
2.
DescriptionTheIHAVEcommandinformstheserverthattheclienthasanarticlewiththespecifiedmessage-id.
Iftheserverdesiresacopyofthatarticle,a335responseMUSTbereturned,instructingtheclienttosendtheentirearticle.
Iftheserverdoesnotwantthearticle(if,forexample,theserveralreadyhasacopyofit),a435responseMUSTbereturned,indicatingthatthearticleisnotwanted.
Finally,ifthearticleisn'twantedimmediatelybuttheclientshouldretrylaterifpossible(if,forexample,anotherclientisintheprocessofsendingthesamearticletotheserver),a436responseMUSTbereturned.
FeatherStandardsTrack[Page58]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Iftransmissionofthearticleisrequested,theclientMUSTsendtheentirearticle,includingheadersandbody,totheserverasamulti-linedatablock(seeSection3.
1.
1).
Thus,asingledot(".
")onalineindicatestheendofthetext,andlinesstartingwithadotintheoriginaltexthavethatdotdoubledduringtransmission.
TheserverMUSTreturna235response,indicatingthatthearticlewassuccessfullytransferred;a436response,indicatingthatthetransferfailedbutshouldbetriedagainlater;ora437response,indicatingthatthearticlewasrejected.
ThisfunctiondiffersfromthePOSTcommandinthatitisintendedforuseintransferringalready-postedarticlesbetweenhosts.
ItSHOULDNOTbeusedwhentheclientisapersonalnews-readingprogram,sinceuseofthiscommandindicatesthatthearticlehasalreadybeenpostedatanothersiteandissimplybeingforwardedfromanotherhost.
However,despitethis,theserverMAYelectnottopostorforwardthearticleif,afterfurtherexaminationofthearticle,itdeemsitinappropriatetodoso.
Reasonsforsuchsubsequentrejectionofanarticlemayincludeproblemssuchasinappropriatenewsgroupsordistributions,discspacelimitations,articlelengths,garbledheaders,andthelike.
Thesearetypicallyrestrictionsenforcedbytheserverhost'snewssoftwareandnotnecessarilybytheNNTPserveritself.
TheclientSHOULDNOTassumethatthearticlehasbeensuccessfullytransferredunlessitreceivesanaffirmativeresponsefromtheserver.
Alackofresponse(suchasadroppednetworkconnectionoranetworktimeout)SHOULDbetreatedthesameasa436response.
Becausesomenewsserversoftwaremaynotimmediatelybeabletodeterminewhetheranarticleissuitableforpostingorforwarding,anNNTPserverMAYacknowledgethesuccessfultransferofthearticle(witha235response)butlatersilentlydiscardit.
FeatherStandardsTrack[Page59]RFC3977NetworkNewsTransferProtocol(NNTP)October20066.
3.
2.
3.
ExamplesExampleofsuccessfullysendinganarticletoanothersite:[C]IHAVE[S]335Sendit;endwith.
[C]Path:pathost!
demo!
somewhere!
not-for-mail[C]From:"DemoUser"[C]Newsgroups:misc.
test[C]Subject:Iamjustatestarticle[C]Date:6Oct199804:38:40-0500[C]Organization:AnExampleCom,SanJose,CA[C]Message-ID:[C][C]Thisisjustatestarticle.
[C].
[S]235ArticletransferredOKExampleofsendinganarticletoanothersitethatrejectsit.
Notethatthemessage-idintheIHAVEcommandisnotthesameastheoneinthearticleheaders;whilethisisbadpracticeandSHOULDNOTbedone,itisnotforbidden.
[C]IHAVE[S]335Sendit;endwith.
[C]Path:pathost!
demo!
somewhere!
not-for-mail[C]From:"DemoUser"[C]Newsgroups:misc.
test[C]Subject:Iamjustatestarticle[C]Date:6Oct199804:38:40-0500[C]Organization:AnExampleCom,SanJose,CA[C]Message-ID:[C][C]Thisisjustatestarticle.
[C].
[S]437Articlerejected;don'tsendagainFeatherStandardsTrack[Page60]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofsendinganarticletoanothersitewherethetransferfails:[C]IHAVE[S]335Sendit;endwith.
[C]Path:pathost!
demo!
somewhere!
not-for-mail[C]From:"DemoUser"[C]Newsgroups:misc.
test[C]Subject:Iamjustatestarticle[C]Date:6Oct199804:38:40-0500[C]Organization:AnExampleCom,SanJose,CA[C]Message-ID:[C][C]Thisisjustatestarticle.
[C].
[S]436TransferfailedExampleofsendinganarticletoasitethatalreadyhasit:[C]IHAVE[S]435DuplicateExampleofsendinganarticletoasitethatrequeststhatthearticlebetriedagainlater:[C]IHAVE[S]436Retrylater7.
InformationCommandsThissectionlistsothercommandsthatmaybeusedatanytimebetweenthebeginningofasessionanditstermination.
Usingthesecommandsdoesnotalteranystateinformation,buttheresponsegeneratedfromtheirusemayprovideusefulinformationtoclients.
7.
1.
DATE7.
1.
1.
UsageIndicatingcapability:READERSyntaxDATEResponses111yyyymmddhhmmssServerdateandtimeFeatherStandardsTrack[Page61]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ParametersyyyymmddhhmmssCurrentUTCdateandtimeonserver7.
1.
2.
DescriptionThiscommandexiststohelpclientsfindoutthecurrentCoordinatedUniversalTime[TF.
686-1]fromtheserver'sperspective.
ThiscommandSHOULDNOTbeusedasasubstituteforNTP[RFC1305]buttoprovideinformationthatmightbeusefulwhenusingtheNEWNEWScommand(seeSection7.
4).
TheDATEcommandMUSTreturnatimestampfromthesameclockasisusedfordeterminingarticlearrivalandgroupcreationtimes(seeSection6).
ThisclockSHOULDbemonotonic,andadjustmentsSHOULDbemadebyrunningitfastorslowcomparedto"real"timeratherthanbymakingsuddenjumps.
AsystemprovidingNNTPserviceSHOULDkeepthesystemclockasaccurateaspossible,eitherwithNTPorbysomeothermethod.
TheserverMUSTreturna111responsespecifyingthedateandtimeontheserverintheformyyyymmddhhmmss.
ThisdateandtimeisinCoordinatedUniversalTime.
7.
1.
3.
Examples[C]DATE[S]111199906231356247.
2.
HELP7.
2.
1.
UsageThiscommandismandatory.
SyntaxHELPResponses100Helptextfollows(multi-line)7.
2.
2.
DescriptionThiscommandprovidesashortsummaryofthecommandsthatareunderstoodbythisimplementationoftheserver.
Thehelptextwillbepresentedasamulti-linedatablockfollowingthe100responsecode.
FeatherStandardsTrack[Page62]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Thistextisnotguaranteedtobeinanyparticularformat(butmustbeUTF-8)andMUSTNOTbeusedbyclientsasareplacementfortheCAPABILITIEScommanddescribedinSection5.
2.
7.
2.
3.
Examples[C]HELP[S]100Helptextfollows[S]Thisissomehelptext.
Thereisnospecific[S]formattingrequirementforthistest,though[S]itiscustomaryforittolistthevalidcommands[S]andgiveabriefdefinitionofwhattheydo.
[S].
7.
3.
NEWGROUPS7.
3.
1.
UsageIndicatingcapability:READERSyntaxNEWGROUPSdatetime[GMT]Responses231Listofnewnewsgroupsfollows(multi-line)ParametersdateDateinyymmddoryyyymmddformattimeTimeinhhmmssformat7.
3.
2.
DescriptionThiscommandreturnsalistofnewsgroupscreatedontheserversincethespecifieddateandtime.
TheresultsareinthesameformatastheLISTACTIVEcommand(seeSection7.
6.
3).
However,theyMAYincludegroupsnotavailableontheserver(andsonotreturnedbyLISTACTIVE)andMAYomitgroupsforwhichthecreationdateisnotavailable.
Thedateisspecifiedas6or8digitsintheformat[xx]yymmdd,wherexxisthefirsttwodigitsoftheyear(19-99),yyisthelasttwodigitsoftheyear(00-99),mmisthemonth(01-12),andddisthedayofthemonth(01-31).
ClientsSHOULDspecifyallfourdigitsoftheyear.
Ifthefirsttwodigitsoftheyeararenotspecified(thisissupportedonlyforbackwardcompatibility),theyearistobetakenfromthecurrentcenturyifyyissmallerthanorequaltothecurrentyear,andthepreviouscenturyotherwise.
FeatherStandardsTrack[Page63]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Thetimeisspecifiedas6digitsintheformathhmmss,wherehhisthehoursinthe24-hourclock(00-23),mmistheminutes(00-59),andssistheseconds(00-60,toallowforleapseconds).
Thetoken"GMT"specifiesthatthedateandtimearegiveninCoordinatedUniversalTime[TF.
686-1];ifitisomitted,thenthedateandtimearespecifiedintheserver'slocaltimezone.
Notethatthereisnowayofusingtheprotocolspecifiedinthisdocumenttoestablishtheserver'slocaltimezone.
Notethatanemptylistisapossiblevalidresponseandindicatesthattherearenonewnewsgroupssincethatdate-time.
ClientsSHOULDmakeallqueriesusingCoordinatedUniversalTime(i.
e.
,byincludingthe"GMT"argument)whenpossible.
7.
3.
3.
ExamplesExamplewheretherearenewgroups:[C]NEWGROUPS19990624000000GMT[S]231listofnewnewsgroupsfollows[S]alt.
rfc-writers.
recovery41y[S]tx.
natives.
recovery8956y[S].
Examplewheretherearenonewgroups:[C]NEWGROUPS19990624000000GMT[S]231listofnewnewsgroupsfollows[S].
7.
4.
NEWNEWS7.
4.
1.
UsageIndicatingcapability:NEWNEWSSyntaxNEWNEWSwildmatdatetime[GMT]Responses230Listofnewarticlesfollows(multi-line)ParameterswildmatNewsgroupsofinterestdateDateinyymmddoryyyymmddformattimeTimeinhhmmssformatFeatherStandardsTrack[Page64]RFC3977NetworkNewsTransferProtocol(NNTP)October20067.
4.
2.
DescriptionThiscommandreturnsalistofmessage-idsofarticlespostedorreceivedontheserver,inthenewsgroupswhosenamesmatchthewildmat,sincethespecifieddateandtime.
Onemessage-idissentoneachline;theorderoftheresponsehasnospecificsignificanceandmayvaryfromresponsetoresponseinthesamesession.
Amessage-idMAYappearmorethanonce;ifitdoes,ithasthesamemeaningasifitappearedonlyonce.
DateandtimeareinthesameformatastheNEWGROUPScommand(seeSection7.
3).
Notethatanemptylistisapossiblevalidresponseandindicatesthatthereiscurrentlynonewnewsintherelevantgroups.
ClientsSHOULDmakeallqueriesinCoordinatedUniversalTime(i.
e.
,byusingthe"GMT"argument)whenpossible.
7.
4.
3.
ExamplesExamplewheretherearenewarticles:[C]NEWNEWSnews.
*,sci.
*19990624000000GMT[S]230listofnewarticlesbymessage-idfollows[S][S][S].
Examplewheretherearenonewarticles:[C]NEWNEWSalt.
*19990624000000GMT[S]230listofnewarticlesbymessage-idfollows[S].
7.
5.
TimeAsdescribedinSection6,eacharticlehasanarrivaltimestamp.
Eachnewsgroupalsohasacreationtimestamp.
ThesetimestampsareusedbytheNEWNEWSandNEWGROUPcommandstoconstructtheirresponses.
ClientscanensurethattheydonothavegapsinlistsofarticlesorgroupsbyusingtheDATEcommandinthefollowingmanner:Firstsession:IssueDATEcommandandrecordresult.
IssueNEWNEWScommandusingapreviouslychosentimestamp.
FeatherStandardsTrack[Page65]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Subsequentsessions:IssueDATEcommandandholdresultintemporarystorage.
IssueNEWNEWScommandusingtimestampsavedfromprevioussession.
Overwritesavedtimestampwiththatcurrentlyintemporarystorage.
Inordertoallowforminorerrors,clientsMAYwanttoadjustthetimestampbackbytwoorthreeminutesbeforeusingitinNEWNEWS.
7.
5.
1.
ExamplesFirstsession:[C]DATE[S]11120010203112233[C]NEWNEWSlocal.
chat20001231235959GMT[S]230listfollows[S][S][S][S].
Secondsession(theclienthassubtracted3minutesfromthetimestampreturnedpreviously):[C]DATE[S]11120010204003344[C]NEWNEWSlocal.
chat20010203111933GMT[S]230listfollows[S][S][S][S].
Notehowarrivedinthe3minutegapandsoislistedinbothresponses.
7.
6.
TheLISTCommandsTheLISTfamilyofcommandsallreturninformationthatismulti-lineandthatcan,ingeneral,beexpectednottochangeduringthesession.
Oftentheinformationisrelatedtonewsgroups,inwhichcasetheresponsehasonelinepernewsgroupandawildmatMAYbeprovidedtorestrictthegroupsforwhichinformationisreturned.
Thesetofavailablekeywords(includingthoseprovidedbyextensions)isgiveninthecapabilitylistwithcapabilitylabelLIST.
FeatherStandardsTrack[Page66]RFC3977NetworkNewsTransferProtocol(NNTP)October20067.
6.
1.
LIST7.
6.
1.
1.
UsageIndicatingcapability:LISTSyntaxLIST[keyword[wildmat|argument]]Responses215Informationfollows(multi-line)ParameterskeywordInformationrequested[1]argumentSpecifictokeywordwildmatGroupsofinterest[1]Ifnokeywordisprovided,itdefaultstoACTIVE.
7.
6.
1.
2.
DescriptionTheLISTcommandallowstheservertoprovideblocksofinformationtotheclient.
Thisinformationmaybeglobalormayberelatedtonewsgroups;inthelattercase,theinformationmaybereturnedeitherforallgroupsoronlyforthosematchingawildmat.
Eachblockofinformationisrepresentedbyadifferentkeyword.
Thecommandreturnsthespecificinformationidentifiedbythekeyword.
Iftheinformationisavailable,itisreturnedasamulti-linedatablockfollowingthe215responsecode.
Theformatoftheinformationdependsonthekeyword.
TheinformationMAYbeaffectedbytheadditionalargument,buttheformatMUSTNOTbe.
Iftheinformationisbasedonnewsgroupsandtheoptionalwildmatargumentisspecified,theresponseislimitedtoonlythegroups(ifany)whosenamesmatchthewildmatandforwhichtheinformationisavailable.
Notethatanemptylistisapossiblevalidresponse;foranewsgroup-basedkeyword,itindicatesthattherearenogroupsmeetingtheabovecriteria.
Ifthekeywordisnotrecognised,orifanargumentisspecifiedandthekeyworddoesnotexpectone,a501responsecodeMUSTBEreturned.
Ifthekeywordisrecognisedbuttheserverdoesnotmaintaintheinformation,a503responsecodeMUSTBEreturned.
FeatherStandardsTrack[Page67]RFC3977NetworkNewsTransferProtocol(NNTP)October2006TheLISTcommandMUSTNOTchangethevisiblestateoftheserverinanyway;thatis,thebehaviourofsubsequentcommandsMUSTNOTbeaffectedbywhethertheLISTcommandwasissued.
Forexample,itMUSTNOTmakegroupsavailablethatotherwisewouldnothavebeen.
7.
6.
1.
3.
ExamplesExampleofLISTwiththeACTIVEkeyword:[C]LISTACTIVE[S]215listofnewsgroupsfollows[S]misc.
test30023223000234y[S]comp.
risks442001441099m[S]alt.
rfc-writers.
recovery41y[S]tx.
natives.
recovery8956y[S]tx.
natives.
recovery.
d119n[S].
ExampleofLISTwithnokeyword:[C]LIST[S]215listofnewsgroupsfollows[S]misc.
test30023223000234y[S]comp.
risks442001441099m[S]alt.
rfc-writers.
recovery41y[S]tx.
natives.
recovery8956y[S]tx.
natives.
recovery.
d119n[S].
Theoutputisidenticaltothatofthepreviousexample.
ExampleofLISTonanewsgroup-basedkeywordwithandwithoutwildmat:[C]LISTACTIVE.
TIMES[S]215informationfollows[S]misc.
test930445408[S]alt.
rfc-writers.
recovery930562309[S]tx.
natives.
recovery930678923[S].
[C]LISTACTIVE.
TIMEStx.
*[S]215informationfollows[S]tx.
natives.
recovery930678923[S].
FeatherStandardsTrack[Page68]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofLISTreturninganerrorwherethekeywordisrecognizedbutthesoftwaredoesnotmaintainthisinformation:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]LISTACTIVENEWSGROUPSACTIVE.
TIMESXTRA.
DATA[S].
[C]LISTXTRA.
DATA[S]503DataitemnotstoredExampleofLISTwherethekeywordisnotrecognised:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]LISTACTIVENEWSGROUPSACTIVE.
TIMESXTRA.
DATA[S].
[C]LISTDISTRIB.
PATS[S]501SyntaxError7.
6.
2.
StandardLISTKeywordsThisspecificationdefinesthefollowingLISTkeywords:|Keyword|Definition|Status||ACTIVE|Section7.
6.
3|MandatoryiftheREADERcapability||||isadvertised||||||ACTIVE.
TIMES|Section7.
6.
4|Optional||||||DISTRIB.
PATS|Section7.
6.
5|Optional||||||HEADERS|Section8.
6|MandatoryiftheHDRcapabilityis||||advertised||||||NEWSGROUPS|Section7.
6.
6|MandatoryiftheREADERcapability||||isadvertised||||||OVERVIEW.
FMT|Section8.
4|MandatoryiftheOVERcapability||||isadvertised|FeatherStandardsTrack[Page69]RFC3977NetworkNewsTransferProtocol(NNTP)October2006WhereoneoftheseLISTkeywordsissupportedbyaserver,itMUSThavethemeaninggivenintherelevantsub-section.
7.
6.
3.
LISTACTIVEThiskeywordMUSTbesupportedbyserversadvertisingtheREADERcapability.
LISTACTIVEreturnsalistofvalidnewsgroupsandassociatedinformation.
Ifnowildmatisspecified,theserverMUSTincludeeverygroupthattheclientispermittedtoselectwiththeGROUPcommand(Section6.
1.
1).
Eachlineofthislistconsistsoffourfieldsseparatedfromeachotherbyoneormorespaces:oThenameofthenewsgroup.
oThereportedhighwatermarkforthegroup.
oThereportedlowwatermarkforthegroup.
oThecurrentstatusofthegrouponthisserver.
ThereportedhighandlowwatermarksareasdescribedintheGROUPcommand(seeSection6.
1.
1),butnotethattheyareintheoppositeordertothe211responsetothatcommand.
Thestatusfieldistypicallyoneofthefollowing:"y"Postingispermitted.
"n"Postingisnotpermitted.
"m"Postingswillbeforwardedtothenewsgroupmoderator.
TheserverSHOULDusethesevalueswhenthesemeaningsarerequiredandMUSTNOTusethemwithanyothermeaning.
Othervaluesforthestatusmayexist;thedefinitionoftheseothervaluesandthecircumstancesunderwhichtheyarereturnedmaybespecifiedinanextensionormaybeprivatetotheserver.
AclientSHOULDtreatanunrecognizedstatusasgivingnoinformation.
Thestatusofanewsgrouponlyindicateshowpoststothatnewsgrouparenormallyprocessedandisnotnecessarilycustomisedtothespecificclient.
Forexample,ifthecurrentclientisforbiddenfromposting,thenthiswillapplyequallytogroupswithstatus"y".
Conversely,aclientwithspecialprivileges(notdefinedbythisspecification)mightbeabletoposttoagroupwithstatus"n".
FeatherStandardsTrack[Page70]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Forexample:[C]LISTACTIVE[S]215listofnewsgroupsfollows[S]misc.
test30023223000234y[S]comp.
risks442001441099m[S]alt.
rfc-writers.
recovery41y[S]tx.
natives.
recovery8956y[S]tx.
natives.
recovery.
d119n[S].
or,onanimplementationthatincludesleadingzeroes:[C]LISTACTIVE[S]215listofnewsgroupsfollows[S]misc.
test00030023220003000234y[S]comp.
risks00004420010000441099m[S]alt.
rfc-writers.
recovery00000000040000000001y[S]tx.
natives.
recovery00000000890000000056y[S]tx.
natives.
recovery.
d00000000110000000009n[S].
Theinformationisnewsgroupbased,andawildmatMAYbespecified,inwhichcasetheresponseislimitedtoonlythegroups(ifany)whosenamesmatchthewildmat.
Forexample:[C]LISTACTIVE*.
recovery[S]215listofnewsgroupsfollows[S]alt.
rfc-writers.
recovery41y[S]tx.
natives.
recovery8956y[S].
7.
6.
4.
LISTACTIVE.
TIMESThiskeywordisoptional.
Theactive.
timeslistismaintainedbysomeNNTPserverstocontaininformationaboutwhocreatedaparticularnewsgroupandwhen.
Eachlineofthislistconsistsofthreefieldsseparatedfromeachotherbyoneormorespaces.
Thefirstfieldisthenameofthenewsgroup.
Thesecondisthetimewhenthisgroupwascreatedonthisnewsserver,measuredinsecondssincethestartofJanuary1,1970.
Thethirdisplaintextintendedtodescribetheentitythatcreatedthenewsgroup;itisoftenamailboxasdefinedinRFC2822[RFC2822].
Forexample:FeatherStandardsTrack[Page71]RFC3977NetworkNewsTransferProtocol(NNTP)October2006[C]LISTACTIVE.
TIMES[S]215informationfollows[S]misc.
test930445408[S]alt.
rfc-writers.
recovery930562309[S]tx.
natives.
recovery930678923[S].
ThelistMAYomitnewsgroupsforwhichtheinformationisunavailableandMAYincludegroupsnotavailableontheserver;inparticular,itMAYomitallgroupscreatedbeforethedateandtimeoftheoldestentry.
TheclientMUSTNOTassumethatthelistiscompleteorthatitmatchesthelistreturnedbytheLISTACTIVEcommand(Section7.
6.
3).
TheNEWGROUPScommand(Section7.
3)mayprovideabetterwaytoaccessthisinformation,andtheresultsofthetwocommandsSHOULDbeconsistentexceptthat,ifthelatterisinvokedwithadateandtimeearlierthantheoldestentryinactive.
timeslist,itsresultmayincludeextragroups.
Theinformationisnewsgroupbased,andawildmatMAYbespecified,inwhichcasetheresponseislimitedtoonlythegroups(ifany)whosenamesmatchthewildmat.
7.
6.
5.
LISTDISTRIB.
PATSThiskeywordisoptional.
Thedistrib.
patslistismaintainedbysomeNNTPserverstoassistclientstochooseavalueforthecontentoftheDistributionheaderofanewsarticlebeingposted.
Eachlineofthislistconsistsofthreefieldsseparatedfromeachotherbyacolon(":").
Thefirstfieldisaweight,thesecondfieldisawildmat(whichmaybeasimplenewsgroupname),andthethirdfieldisavaluefortheDistributionheadercontent.
Forexample:[C]LISTDISTRIB.
PATS[S]215informationfollows[S]10:local.
*:local[S]5:*:world[S]20:local.
here.
*:thissite[S].
TheclientMAYusethisinformationtoconstructanappropriateDistributionheadergiventhenameofanewsgroup.
Todoso,itshoulddeterminethelineswhosesecondfieldmatchesthenewsgroupname,selectfromamongthemthelinewiththehighestweight(with0beingthelowest),andusethevalueofthethirdfieldtoconstructtheDistributionheader.
FeatherStandardsTrack[Page72]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Theinformationisnotnewsgroupbased,andanargumentMUSTNOTbespecified.
7.
6.
6.
LISTNEWSGROUPSThiskeywordMUSTbesupportedbyserversadvertisingtheREADERcapability.
ThenewsgroupslistismaintainedbyNNTPserverstocontainthenameofeachnewsgroupthatisavailableontheserverandashortdescriptionaboutthepurposeofthegroup.
EachlineofthislistconsistsoftwofieldsseparatedfromeachotherbyoneormorespaceorTABcharacters(theusualpracticeisasingleTAB).
Thefirstfieldisthenameofthenewsgroup,andthesecondisashortdescriptionofthegroup.
Forexample:[C]LISTNEWSGROUPS[S]215informationfollows[S]misc.
testGeneralUsenettesting[S]alt.
rfc-writers.
recoveryRFCWritersRecovery[S]tx.
natives.
recoveryTexasNativesRecovery[S].
ThelistMAYomitnewsgroupsforwhichtheinformationisunavailableandMAYincludegroupsnotavailableontheserver.
TheclientMUSTNOTassumethatthelistiscompleteorthatitmatchesthelistreturnedbyLISTACTIVE.
ThedescriptionSHOULDbeinUTF-8.
However,serversoftenobtaintheinformationfromexternalsources.
Thesesourcesmayhaveuseddifferentencodings(onesthatuseoctetsintherange128to255insomeothermanner)and,inthatcase,theserverMAYpassitonunchanged.
Therefore,clientsMUSTbepreparedtoreceivesuchdescriptions.
Theinformationisnewsgroupbased,andawildmatMAYbespecified,inwhichcasetheresponseislimitedtoonlythegroups(ifany)whosenamesmatchthewildmat.
8.
ArticleFieldAccessCommandsThissectionlistscommandsthatmaybeusedtoaccessspecificarticlefields;thatis,headersofarticlesandmetadataaboutarticles.
Thesecommandstypicallyfetchdatafroman"overviewdatabase",whichisadatabaseofheadersextractedfromincomingarticlesplusmetadatadeterminedasthearticlearrives.
Onlycertainfieldsareincludedinthedatabase.
FeatherStandardsTrack[Page73]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ThissectionisbasedontheOverview/NOVdatabase[ROBE1995]developedbyGeoffCollyer.
8.
1.
ArticleMetadataArticle"metadata"isdataaboutarticlesthatdoesnotoccurwithinthearticleitself.
EachmetadataitemhasanamethatMUSTbeginwithacolon(andthatMUSTNOTcontainacolonelsewherewithinit).
Aswithheadernames,metadataitemnamesarenotcasesensitive.
Whengeneratingametadataitem,theserverMUSTcomputeitforitselfandMUSTNOTtrustanyrelatedvalueprovidedinthearticle.
(Inparticular,aLinesorBytesheaderinthearticleMUSTNOTbeassumedtospecifythecorrectnumberoflinesorbytesinthearticle.
)Iftheserverhasaccesstoseveralnon-identicalcopiesofanarticle,thevaluereturnedMUSTbecorrectforanycopyofthatarticleretrievedduringthesamesession.
Thisspecificationdefinestwometadataitems:":bytes"and":lines".
Othermetadataitemsmaybedefinedbyextensions.
ThenamesofmetadataitemsdefinedbyregisteredextensionsMUSTNOTbeginwith":x-".
Toavoidtheriskofaclashwithafutureregisteredextension,thenamesofmetadataitemsdefinedbyprivateextensionsSHOULDbeginwith":x-".
8.
1.
1.
The:bytesMetadataItemThe:bytesmetadataitemforanarticleisadecimalinteger.
ItSHOULDequalthenumberofoctetsintheentirearticle:headers,body,andseparatingemptyline(countingaCRLFpairastwooctets,andexcludingboththe".
"CRLFterminatingtheresponseandany".
"addedfor"dot-stuffing"purposes).
Notetoclientimplementers:someexistingserversreturnavaluedifferentfromthatabove.
Thecommonestreasonsforthisareasfollows:oCountingaCRLFpairasoneoctet.
oIncludingthe".
"characterusedfordot-stuffinginthenumber.
oIncludingtheterminating".
"CRLFinthenumber.
oUsingonecopyofanarticleforcountingtheoctetsbutthenreturninganotheronethatdiffersinsome(permitted)manner.
ImplementationsshouldbepreparedforsuchvariationandMUSTNOTrelyonthevaluebeingaccurate.
FeatherStandardsTrack[Page74]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
1.
2.
The:linesMetadataItemThe:linesmetadataitemforanarticleisadecimalinteger.
ItMUSTequalthenumberoflinesinthearticlebody(excludingtheemptylineseparatingheadersandbody).
Equivalently,itistwolessthanthenumberofCRLFpairsthattheBODYcommandwouldreturnforthatarticle(theextratwoarethosefollowingtheresponsecodeandtheterminationoctet).
8.
2.
DatabaseConsistencyTheinformationstoredintheoverviewdatabasemaychangeovertime.
Ifthedatabaserecordsthecontentorabsenceofagivenfield(thatis,aheaderormetadataitem)forallarticles,itissaidtobe"consistent"forthatfield.
Ifitrecordsthecontentofaheaderforsomearticlesbutnotforothersthatneverthelessincludedthatheader,orifitrecordsametadataitemforsomearticlesbutnotforotherstowhichthatitemapplies,itissaidtobe"inconsistent"forthatfield.
TheLISTOVERVIEW.
FMTcommandSHOULDlistallthefieldsforwhichthedatabaseisconsistentatthatmoment.
ItMAYomitsuchfields(forexample,ifitisnotknownwhetherthedatabaseisconsistentorinconsistent).
ItMUSTNOTincludefieldsforwhichthedatabaseisinconsistentorthatarenotstoredinthedatabase.
Therefore,ifaheaderappearsintheLISTOVERVIEW.
FMToutputbutnotintheOVERoutputforagivenarticle,thatheaderdoesnotappearinthearticle(similarlyformetadataitems).
Theserulesassumethatthefieldsbeingstoredinthedatabaseremainconstantforlongperiodsoftime,andthereforethedatabasewillbeconsistent.
Whenthesetoffieldstobestoredischanged,itwillbeinconsistentuntileitherthedatabaseisrebuiltortheonlyarticlesremainingarethosereceivedsincethechange.
Therefore,theoutputfromLISTOVERVIEW.
FMTneedstobealteredtwice.
Firstly,beforeanyfieldsstopbeingstoredtheyMUSTberemovedfromtheoutput;then,whenthedatabaseisoncemoreknowntobeconsistent,thenewfieldsSHOULDbeaddedtotheoutput.
IftheHDRcommandusestheoverviewdatabaseratherthantakinginformationdirectlyfromthearticles,thesameissuesofconsistencyandinconsistencyapply,andtheLISTHEADERScommandSHOULDtakethesameapproachastheLISTOVERVIEW.
FMTcommandinresolvingthem.
FeatherStandardsTrack[Page75]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
3.
OVER8.
3.
1.
UsageIndicatingcapability:OVERSyntaxOVERmessage-idOVERrangeOVERResponsesFirstform(message-idspecified)224Overviewinformationfollows(multi-line)430Noarticlewiththatmessage-idSecondform(rangespecified)224Overviewinformationfollows(multi-line)412Nonewsgroupselected423NoarticlesinthatrangeThirdform(currentarticlenumberused)224Overviewinformationfollows(multi-line)412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersrangeNumber(s)ofarticlesmessage-idMessage-idofarticle8.
3.
2.
DescriptionTheOVERcommandreturnsthecontentsofallthefieldsinthedatabaseforanarticlespecifiedbymessage-id,orfromaspecifiedarticleorrangeofarticlesinthecurrentlyselectednewsgroup.
Themessage-idargumentindicatesaspecificarticle.
Therangeargumentmaybeanyofthefollowing:oAnarticlenumber.
oAnarticlenumberfollowedbyadashtoindicateallfollowing.
oAnarticlenumberfollowedbyadashfollowedbyanotherarticlenumber.
Ifneitherisspecified,thecurrentarticlenumberisused.
FeatherStandardsTrack[Page76]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Supportforthefirst(message-id)formisoptional.
Ifitissupported,theOVERcapabilitylineMUSTincludetheargument"MSGID".
Otherwise,thecapabilitylineMUSTNOTincludethisargument,andtheOVERcommandMUSTreturnthegenericresponsecode503whenthisformisused.
Iftheinformationisavailable,itisreturnedasamulti-linedatablockfollowingthe224responsecodeandcontainsonelineperarticle,sortedinnumericalorderofarticlenumber.
(Notethatunlesstheargumentisarangeincludingadash,therewillbeexactlyonelineinthedatablock.
)EachlineconsistsofanumberoffieldsseparatedbyaTAB.
Afieldmaybeempty(inwhichcasetherewillbetwoadjacentTABs),andasequenceoftrailingTABsmaybeomitted.
Thefirst8fieldsMUSTbethefollowing,inorder:"0"orarticlenumber(seebelow)SubjectheadercontentFromheadercontentDateheadercontentMessage-IDheadercontentReferencesheadercontent:bytesmetadataitem:linesmetadataitemIfthearticleisspecifiedbymessage-id(thefirstformofthecommand),thearticlenumberMUSTbereplacedwithzero,exceptthatifthereisacurrentlyselectednewsgroupandthearticleispresentinthatgroup,theserverMAYusethearticle'snumberinthatgroup.
(SeetheARTICLEcommand(Section6.
2.
1)andSTATexamples(Section6.
2.
4.
3)formoredetails.
)Intheothertwoformsofthecommand,thearticlenumberMUSTbereturned.
Anysubsequentfieldsarethecontentsoftheotherheadersandmetadataheldinthedatabase.
Forthefivemandatoryheaders,thecontentofeachfieldMUSTbebasedonthecontentoftheheader(thatis,withtheheadernameandfollowingcolonandspaceremoved).
Ifthearticledoesnotcontainthatheader,orifthecontentisempty,thefieldMUSTbeempty.
Forthetwomandatorymetadataitems,thecontentofthefieldMUSTbejustthevalue,withnoothertext.
Forallsubsequentfieldsthatcontainheaders,thecontentMUSTbetheentireheaderlineotherthanthetrailingCRLF.
Forallsubsequentfieldsthatcontainmetadata,thefieldconsistsofthemetadataname,asinglespace,andthenthevalue.
FeatherStandardsTrack[Page77]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Forallfields,thevalueisprocessedbyfirstremovingallCRLFpairs(thatis,undoinganyfoldingandremovingtheterminatingCRLF)andthenreplacingeachTABwithasinglespace.
Ifthereisnosuchheaderinthearticle,nosuchmetadataitem,ornoheaderoritemstoredinthedatabaseforthatarticle,thecorrespondingfieldMUSTbeempty.
Notethat,afterunfolding,thecharactersNUL,LF,andCRcannotoccurintheheaderofanarticleofferedbyaconformantserver.
Nevertheless,serversSHOULDcheckforthesecharactersandreplaceeachonebyasinglespace(sothat,forexample,CRLFLFTABwillbecometwospaces,sincetheCRandfirstLFwillberemovedbytheunfoldingprocess).
Thiswillencouragerobustnessinthefaceofnon-conformingdata;itisalsopossiblethatfutureversionsofthisspecificationcouldpermitthesecharacterstoappearinarticles.
TheserverSHOULDNOTproduceoutputforarticlesthatnolongerexist.
Iftheargumentisamessage-idandnosucharticleexists,a430responseMUSTbereturned.
Iftheargumentisarangeorisomittedandthecurrentlyselectednewsgroupisinvalid,a412responseMUSTbereturned.
Iftheargumentisarangeandnoarticlesinthatnumberrangeexistinthecurrentlyselectednewsgroup,includingthecasewherethesecondnumberislessthanthefirstone,a423responseMUSTbereturned.
Iftheargumentisomittedandthecurrentarticlenumberisinvalid,a420responseMUSTbereturned.
8.
3.
3.
ExamplesInthefirstfourexamples,TABhasbeenreplacedbyverticalbarandsomelineshavebeenfoldedforreadability.
Exampleofasuccessfulretrievalofoverviewinformationforanarticle(explicitlynotusinganarticlenumber):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]OVER[S]224Overviewinformationfollows[S]3000234|Iamjustatestarticle|"DemoUser"|6Oct199804:38:40-0500|||1234|17|Xref:news.
example.
commisc.
test:3000363[S].
FeatherStandardsTrack[Page78]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofasuccessfulretrievalofoverviewinformationforanarticlebymessage-id:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]OVERMSGID[S]LISTACTIVENEWSGROUPSOVERVIEW.
FMT[S].
[C]OVER[S]224Overviewinformationfollows[S]0|Iamjustatestarticle|"DemoUser"|6Oct199804:38:40-0500|||1234|17|Xref:news.
example.
commisc.
test:3000363[S].
Notethatthearticlenumberhasbeenreplacedby"0".
Exampleofthesamecommandsonasystemthatdoesnotimplementretrievalbymessage-id:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]OVER[S]LISTACTIVENEWSGROUPSOVERVIEW.
FMT[S].
[C]OVER[S]503Overviewbymessage-idunsupportedFeatherStandardsTrack[Page79]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofasuccessfulretrievalofoverviewinformationforarangeofarticles:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]OVER3000234-3000240[S]224Overviewinformationfollows[S]3000234|Iamjustatestarticle|"DemoUser"|6Oct199804:38:40-0500|||1234|17|Xref:news.
example.
commisc.
test:3000363[S]3000235|Anothertestarticle|nobody@nowhere.
to(DemoUser)|6Oct199804:38:45-0500|||4818|37||Distribution:fi[S]3000238|Re:Iamjustatestarticle|somebody@elsewhere.
to|7Oct199811:38:40+1200|||9234|51[S].
Notethemissing"References"andXrefheadersinthesecondline,themissingtrailingfieldsinthefirstandlastlines,andthatthereareonlyresultsforthosearticlesthatstillexist.
Exampleofanunsuccessfulretrievalofoverviewinformationonanarticlebynumber:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]OVER300256[S]423NosucharticleinthisgroupExampleofaninvalidrange:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]OVER3000444-3000222[S]423EmptyrangeExampleofanunsuccessfulretrievalofoverviewinformationbynumberbecausenonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]OVER[S]412NonewsgroupselectedFeatherStandardsTrack[Page80]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanattempttoretrieveinformationwhenthecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]OVER[S]420Nocurrentarticleselected8.
4.
LISTOVERVIEW.
FMT8.
4.
1.
UsageIndicatingcapability:OVERSyntaxLISTOVERVIEW.
FMTResponses215Informationfollows(multi-line)8.
4.
2.
DescriptionSeeSection7.
6.
1forgeneralrequirementsoftheLISTcommand.
TheLISTOVERVIEW.
FMTcommandreturnsadescriptionofthefieldsinthedatabaseforwhichitisconsistent(asdescribedabove).
Theinformationisreturnedasamulti-linedatablockfollowingthe215responsecode.
TheinformationcontainsonelineperfieldintheorderinwhichtheyarereturnedbytheOVERcommand;thefirst7linesMUST(exceptforthecaseofletters)beexactlyasfollows:Subject:From:Date:Message-ID:References::bytes:linesForcompatibilitywithexistingimplementations,thelasttwolinesMAYinsteadbe:Bytes:Lines:eventhoughtheyrefertometadata,notheaders.
FeatherStandardsTrack[Page81]RFC3977NetworkNewsTransferProtocol(NNTP)October2006AllsubsequentlinesMUSTconsistofeitheraheadernamefollowedby":full",orthenameofapieceofmetadata.
Therearenoleadingortrailingspacesintheoutput.
Notethatthe7fixedlinesdescribethe2ndto8thfieldsoftheOVERoutput.
The"full"suffix(whichmayuseeitheruppercase,lowercase,oramix)isareminderthatthecorrespondingfieldsincludetheheadername.
ThiscommandMAYgeneratedifferentresultsifitisusedmorethanonceinasession.
IftheOVERcommandisnotimplemented,themeaningoftheoutputfromthiscommandisnotspecified,butitmuststillmeettheabovesyntacticrequirements.
8.
4.
3.
ExamplesExampleofLISTOVERVIEW.
FMToutputcorrespondingtotheexampleOVERoutputabove,inthepreferredformat:[C]LISTOVERVIEW.
FMT[S]215Orderoffieldsinoverviewdatabase.
[S]Subject:[S]From:[S]Date:[S]Message-ID:[S]References:[S]:bytes[S]:lines[S]Xref:full[S]Distribution:full[S].
FeatherStandardsTrack[Page82]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofLISTOVERVIEW.
FMToutputcorrespondingtotheexampleOVERoutputabove,inthealternativeformat:[C]LISTOVERVIEW.
FMT[S]215Orderoffieldsinoverviewdatabase.
[S]Subject:[S]From:[S]Date:[S]Message-ID:[S]References:[S]Bytes:[S]Lines:[S]Xref:FULL[S]Distribution:FULL[S].
8.
5.
HDR8.
5.
1.
UsageIndicatingcapability:HDRSyntaxHDRfieldmessage-idHDRfieldrangeHDRfieldResponsesFirstform(message-idspecified)225Headersfollow(multi-line)430Noarticlewiththatmessage-idSecondform(rangespecified)225Headersfollow(multi-line)412Nonewsgroupselected423NoarticlesinthatrangeThirdform(currentarticlenumberused)225Headersfollow(multi-line)412Nonewsgroupselected420CurrentarticlenumberisinvalidParametersfieldNameoffieldrangeNumber(s)ofarticlesmessage-idMessage-idofarticleFeatherStandardsTrack[Page83]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
5.
2.
DescriptionTheHDRcommandprovidesaccesstospecificfieldsfromanarticlespecifiedbymessage-id,orfromaspecifiedarticleorrangeofarticlesinthecurrentlyselectednewsgroup.
ItMAYtaketheinformationdirectlyfromthearticlesorfromtheoverviewdatabase.
Inthecaseofheaders,animplementationMAYrestricttheuseofthiscommandtoaspecificlistofheadersorMAYallowittobeusedwithanyheader;itmaybehavedifferentlywhenitisusedwithamessage-idargumentandwhenitisusedwitharangeornoargument.
Therequiredfieldargumentisthenameofaheaderwiththecolonomitted(e.
g.
,"subject")orthenameofametadataitemincludingtheleadingcolon(e.
g.
,":bytes"),andiscaseinsensitive.
Themessage-idargumentindicatesaspecificarticle.
Therangeargumentmaybeanyofthefollowing:oAnarticlenumber.
oAnarticlenumberfollowedbyadashtoindicateallfollowing.
oAnarticlenumberfollowedbyadashfollowedbyanotherarticlenumber.
Ifneitherisspecified,thecurrentarticlenumberisused.
Iftheinformationisavailable,itisreturnedasamulti-linedatablockfollowingthe225responsecodeandcontainsonelineforeacharticleintherangethatexists.
(Notethatunlesstheargumentisarangeincludingadash,therewillbeexactlyonelineinthedatablock.
)Thelineconsistsofthearticlenumber,aspace,andthenthecontentsofthefield.
Inthecaseofaheader,theheadername,thecolon,andthefirstspaceafterthecolonareallomitted.
Ifthearticleisspecifiedbymessage-id(thefirstformofthecommand),thearticlenumberMUSTbereplacedwithzero,exceptthatifthereisacurrentlyselectednewsgroupandthearticleispresentinthatgroup,theserverMAYusethearticle'snumberinthatgroup.
(SeetheARTICLEcommand(Section6.
2.
1)andSTATexamples(Section6.
2.
4.
3)formoredetails.
)Intheothertwoformsofthecommand,thearticlenumberMUSTbereturned.
Headercontentsaremodifiedasfollows:allCRLFpairsareremoved,andtheneachTABisreplacedwithasinglespace.
(NotethatthisisthesametransformationasisperformedbytheOVERcommand(Section8.
3.
2),andthesamecommentconcerningNUL,CR,andLFapplies.
)FeatherStandardsTrack[Page84]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Notethedistinctionbetweenheadersandmetadataappearingtohavethesamemeaning.
Headersarealwaystakenunchangedfromthearticle;metadataarealwayscalculated.
Forexample,arequestfor"Lines"returnsthecontentsofthe"Lines"headerofthespecifiedarticles,ifany,nomatterwhethertheyaccuratelystatethenumberoflines,whilearequestfor":lines"returnsthelinecountmetadata,whichisalwaystheactualnumberoflinesirrespectiveofwhatanyheadermaystate.
Iftherequestedheaderisnotpresentinthearticle,orifitispresentbutempty,alineforthatarticleisincludedintheoutput,buttheheadercontentportionofthelineisempty(thespaceafterthearticlenumberMAYberetainedoromitted).
Iftheheaderoccursinagivenarticlemorethanonce,onlythecontentofthefirstoccurrenceisreturnedbyHDR.
Ifanyarticlenumberintheprovidedrangedoesnotexistinthegroup,nolineforthatarticlenumberisincludedintheoutput.
Ifthesecondargumentisamessage-idandnosucharticleexists,a430responseMUSTbereturned.
Ifthesecondargumentisarangeorisomittedandthecurrentlyselectednewsgroupisinvalid,a412responseMUSTbereturned.
Ifthesecondargumentisarangeandnoarticlesinthatnumberrangeexistinthecurrentlyselectednewsgroup,includingthecasewherethesecondnumberislessthanthefirstone,a423responseMUSTbereturned.
Ifthesecondargumentisomittedandthecurrentarticlenumberisinvalid,a420responseMUSTbereturned.
AserverMAYonlyallowHDRcommandsforalimitedsetoffields;itmaybehavedifferentlyinthisrespectforthefirst(message-id)formfromhowitwouldfortheotherforms.
Ifso,itMUSTrespondwiththegeneric503responsetoattemptstorequestotherfields,ratherthanreturnerroneousresults,suchasasuccessfulemptyresponse.
IfHDRusestheoverviewdatabaseanditisinconsistentfortherequestedfield,theserverMAYreturnwhatresultsitcan,oritMAYrespondwiththegeneric503response.
Inthelattercase,thefieldMUSTNOTappearintheoutputfromLISTHEADERS.
FeatherStandardsTrack[Page85]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
5.
3.
ExamplesExampleofasuccessfulretrievalofsubjectlinesfromarangeofarticles(3000235hasnoSubjectheader,and3000236ismissing):[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HDRSubject3000234-3000238[S]225Headersfollow[S]3000234Iamjustatestarticle[S]3000235[S]3000237Re:Iamjustatestarticle[S]3000238Ditto[S].
Exampleofasuccessfulretrievaloflinecountsfromarangeofarticles:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HDR:lines3000234-3000238[S]225Headersfollow[S]300023442[S]30002355[S]300023711[S]30002382378[S].
Exampleofasuccessfulretrievalofthesubjectlinefromanarticlebymessage-id:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HDRsubject[S]225Headerinformationfollows[S]0Iamjustatestarticle[S].
Exampleofasuccessfulretrievalofthesubjectlinefromthecurrentarticle:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HDRsubject[S]225Headerinformationfollows[S]3000234Iamjustatestarticle[S].
FeatherStandardsTrack[Page86]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Exampleofanunsuccessfulretrievalofaheaderfromanarticlebymessage-id:[C]HDRsubject[S]430NoSuchArticleFoundExampleofanunsuccessfulretrievalofheadersfromarticlesbynumberbecausenonewsgroupwasselectedfirst:[Assumescurrentlyselectednewsgroupisinvalid.
][C]HDRsubject300256-[S]412NonewsgroupselectedExampleofanunsuccessfulretrievalofheadersbecausethecurrentlyselectednewsgroupisempty:[C]GROUPexample.
empty.
newsgroup[S]211000example.
empty.
newsgroup[C]HDRsubject1-[S]423NoarticlesinthatrangeExampleofanunsuccessfulretrievalofheadersbecausetheserverdoesnotallowHDRcommandsforthatheader:[C]GROUPmisc.
test[S]211123430002343002322misc.
test[C]HDRContent-Type3000234-3000238[S]503HDRnotpermittedonContent-Type8.
6.
LISTHEADERS8.
6.
1.
UsageIndicatingcapability:HDRSyntaxLISTHEADERS[MSGID|RANGE]Responses215Fieldlistfollows(multi-line)ParametersMSGIDRequestslistforaccessbymessage-idRANGERequestslistforaccessbyrangeFeatherStandardsTrack[Page87]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
6.
2.
DescriptionSeeSection7.
6.
1forgeneralrequirementsoftheLISTcommand.
TheLISTHEADERScommandreturnsalistoffieldsthatmayberetrievedusingtheHDRcommand.
Theinformationisreturnedasamulti-linedatablockfollowingthe215responsecodeandcontainsonelineforeachfieldname(excludingthetrailingcolonforheadersandincludingtheleadingcolonformetadataitems).
Iftheimplementationallowsanyheadertoberetrieved,itMUSTNOTincludeanyheadernamesinthelistbutMUSTincludethespecialentry":"(asinglecolononitsown).
ItMUSTstillexplicitlylistanymetadataitemsthatareavailable.
Theorderofitemsinthelistisnotsignificant;theserverneednotevenconsistentlyreturnthesameorder.
ThelistMAYbeempty(thoughinthiscircumstancethereislittlepointinprovidingtheHDRcommand).
AnimplementationthatalsosupportstheOVERcommandSHOULDatleastpermitalltheheadersandmetadataitemslistedintheoutputfromtheLISTOVERVIEW.
FMTcommand.
IftheservertreatsthefirstformoftheHDRcommand(message-idspecified)differentlyfromtheothertwoforms(rangespecifiedorcurrentarticlenumberused)inrespectofwhichheadersormetadataitemsareavailable,thenthefollowingapply:oIftheMSGIDargumentisspecified,theresultsMUSTbethoseavailableforthefirstformoftheHDRcommand.
oIftheRANGEargumentisspecified,theresultsMUSTbethoseavailableforthesecondandthirdformsoftheHDRcommand.
oIfnoargumentisspecified,theresultsMUSTbethoseavailableinallformsoftheHDRcommand(thatis,itMUSTonlylistthoseitemslistedinboththepreviouscases).
Iftheserverdoesnottreatthevariousformsdifferently,thenitMUSTignoreanyargumentandalwaysproducethesameresults(thoughnotnecessarilyalwaysinthesameorder).
IftheHDRcommandisnotimplemented,themeaningoftheoutputfromthiscommandisnotspecified,butitmuststillmeettheabovesyntacticrequirements.
FeatherStandardsTrack[Page88]RFC3977NetworkNewsTransferProtocol(NNTP)October20068.
6.
3.
ExamplesExampleofanimplementationprovidingaccesstoonlyafewheaders:[C]LISTHEADERS[S]215headerssupported:[S]Subject[S]Message-ID[S]Xref[S].
ExampleofanimplementationprovidingaccesstothesamefieldsasthefirstexampleinSection8.
4.
3:[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]OVER[S]HDR[S]LISTACTIVENEWSGROUPSHEADERSOVERVIEW.
FMT[S].
[C]LISTHEADERS[S]215headersandmetadataitemssupported:[S]Date[S]Distribution[S]From[S]Message-ID[S]References[S]Subject[S]Xref[S]:bytes[S]:lines[S].
Exampleofanimplementationprovidingaccesstoallheaders:[C]LISTHEADERS[S]215metadataitemssupported:[S]:[S]:lines[S]:bytes[S]:x-article-number[S].
FeatherStandardsTrack[Page89]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ExampleofanimplementationdistinguishingthefirstformoftheHDRcommandfromtheothertwoforms:[C]LISTHEADERSRANGE[S]215metadataitemssupported:[S]:[S]:lines[S]:bytes[S].
[C]LISTHEADERSMSGID[S]215headersandmetadataitemssupported:[S]Date[S]Distribution[S]From[S]Message-ID[S]References[S]Subject[S]:lines[S]:bytes[S]:x-article-number[S].
[C]LISTHEADERS[S]215headersandmetadataitemssupported:[S]Date[S]Distribution[S]From[S]Message-ID[S]References[S]Subject[S]:lines[S]:bytes[S].
Notethat:x-article-numberdoesnotappearinthelastsetofoutput.
9.
AugmentedBNFSyntaxforNNTP9.
1.
IntroductionEachofthefollowingsectionsdescribesthesyntaxofamajorelementofNNTP.
Thissyntaxextendsandrefinesthedescriptionselsewhereinthisspecificationandshouldbegivenprecedencewhenresolvingapparentconflicts.
NotethatABNF[RFC4234]stringsarecaseinsensitive.
Non-terminalsusedinseveralplacesaredefinedinaseparatesectionattheend.
FeatherStandardsTrack[Page90]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Betweenthem,thenon-terminals,,,andspecifythetextthatflowsbetweenclientandserver.
Aconsistentnamingschemeisusedinthisdocumentforthenon-terminalsrelatingtoeachcommand,andSHOULDbeusedbythespecificationofregisteredextensions.
Foreachcommand,thesequenceisasfollows:oTheclientsendsaninstanceof;thesyntaxfortheEXAMPLEcommandis.
oIftheclientisonethatimmediatelystreamsdata,itsendsaninstanceof;thesyntaxfortheEXAMPLEcommandis.
oTheserversendsaninstanceof.
*Theinitialresponselineisindependentofthecommandthatgeneratedit;ifthe000responsehasarguments,thesyntaxoftheinitiallineis.
*Iftheresponseismulti-line,theinitiallineisfollowedbya.
Thesyntaxforthecontentsofthisblockafter"dot-stuffing"hasbeenremovedis(forthe000responsetotheEXAMPLEcommand)andisaninstanceof.
oWhilethelatestresponseisonethatindicatesmoredataisrequired(ingeneral,a3xxresponse):*theclientsendsaninstanceof;thesyntaxfortheEXAMPLEcontinuationfollowinga333responseis;*theserversendsanotherinstanceof,asabove.
(Therearenocommandsinthisspecificationthatimmediatelystreamdata,butthisnon-terminalisdefinedfortheconvenienceofextensions.
)FeatherStandardsTrack[Page91]RFC3977NetworkNewsTransferProtocol(NNTP)October20069.
2.
CommandsThissyntaxdefinesthenon-terminal,whichrepresentswhatissentfromtheclienttotheserver(seesection3.
1forlimitsonlengths).
command-line=commandEOLcommand=X-commandX-command=keyword*(WStoken)command=/article-command/body-command/capabilities-command/date-command/group-command/hdr-command/head-command/help-command/ihave-command/last-command/list-command/listgroup-command/mode-reader-command/newgroups-command/newnews-command/next-command/over-command/post-command/quit-command/stat-commandarticle-command="ARTICLE"[WSarticle-ref]body-command="BODY"[WSarticle-ref]capabilities-command="CAPABILITIES"[WSkeyword]date-command="DATE"group-command="GROUP"[WSnewsgroup-name]hdr-command="HDR"WSheader-meta-name[WSrange-ref]head-command="HEAD"[WSarticle-ref]help-command="HELP"ihave-command="IHAVE"WSmessage-idlast-command="LAST"list-command="LIST"[WSlist-arguments]listgroup-command="LISTGROUP"[WSnewsgroup-name[WSrange]]mode-reader-command="MODE"WS"READER"newgroups-command="NEWGROUPS"WSdate-timenewnews-command="NEWNEWS"WSwildmatWSdate-timenext-command="NEXT"over-command="OVER"[WSrange-ref]FeatherStandardsTrack[Page92]RFC3977NetworkNewsTransferProtocol(NNTP)October2006post-command="POST"quit-command="QUIT"stat-command="STAT"[WSarticle-ref]article-ref=article-number/message-iddate=date2y/date4ydate4y=4DIGIT2DIGIT2DIGITdate2y=2DIGIT2DIGIT2DIGITdate-time=dateWStime[WS"GMT"]header-meta-name=header-name/metadata-namelist-arguments=keyword[WStoken]metadata-name=":"1*A-NOTCOLONrange=article-number["-"[article-number]]range-ref=range/message-idtime=2DIGIT2DIGIT2DIGIT9.
3.
CommandContinuationThissyntaxdefinesthefurthermaterialsentbytheclientinthecaseofmulti-stagecommandsandthosethatstreamdata.
command-datastream=UNDEFINED;notused,providedasahookforextensionscommand-continuation=ihave-335-continuation/post-340-continuationihave-335-continuation=encoded-articlepost-340-continuation=encoded-articleencoded-article=multi-line-data-block;afterundoingthe"dot-stuffing",thisMUSTmatch9.
4.
Responses9.
4.
1.
GenericResponsesThissyntaxdefinesthenon-terminal,whichrepresentsthegenericformofresponses;thatis,whatissentfromtheservertotheclientinresponsetoaora.
response=simple-response/multi-line-responsesimple-response=initial-response-linemulti-line-response=initial-response-linemulti-line-data-blockinitial-response-line=initial-response-content[SPtrailing-comment]CRLFinitial-response-content=X-initial-response-contentX-initial-response-content=3DIGIT*(SPresponse-argument)FeatherStandardsTrack[Page93]RFC3977NetworkNewsTransferProtocol(NNTP)October2006response-argument=1*A-CHARtrailing-comment=*U-CHAR9.
4.
2.
InitialResponseLineContentsThissyntaxdefinesthespecificinitialresponselinesforthevariouscommandsinthisspecification(seesection3.
1forlimitsonlengths).
Onlythoseresponsecodeswithargumentsarelisted.
initial-response-content=/response-111-content/response-211-content/response-220-content/response-221-content/response-222-content/response-223-content/response-401-contentresponse-111-content="111"SPdate4ytimeresponse-211-content="211"3(SParticle-number)SPnewsgroup-nameresponse-220-content="220"SParticle-numberSPmessage-idresponse-221-content="221"SParticle-numberSPmessage-idresponse-222-content="222"SParticle-numberSPmessage-idresponse-223-content="223"SParticle-numberSPmessage-idresponse-401-content="401"SPcapability-label9.
4.
3.
Multi-lineResponseContentsThissyntaxdefinesthecontentofthevariousmulti-lineresponses;moreprecisely,itdefinesthepartoftheresponseinthemulti-linedatablockafterany"dot-stuffing"hasbeenundone.
Thenumericportionofeachnon-terminalnameindicatestheresponsecodethatisfollowedbythisdata.
multi-line-response-content=article-220-ml-content/body-222-ml-content/capabilities-101-ml-content/hdr-225-ml-content/head-221-ml-content/help-100-ml-content/list-215-ml-content/listgroup-211-ml-content/newgroups-231-ml-content/newnews-230-ml-content/over-224-ml-contentarticle-220-ml-content=articlebody-222-ml-content=bodycapabilities-101-ml-content=version-lineCRLFFeatherStandardsTrack[Page94]RFC3977NetworkNewsTransferProtocol(NNTP)October2006*(capability-lineCRLF)hdr-225-ml-content=*(article-numberSPhdr-contentCRLF)head-221-ml-content=1*headerhelp-100-ml-content=*(*U-CHARCRLF)list-215-ml-content=list-contentlistgroup-211-ml-content=*(article-numberCRLF)newgroups-231-ml-content=active-groups-listnewnews-230-ml-content=*(message-idCRLF)over-224-ml-content=*(article-numberover-contentCRLF)active-groups-list=*(newsgroup-nameSPAarticle-numberSPAarticle-numberSPAnewsgroup-statusCRLF)hdr-content=*S-NONTABhdr-n-content=[(header-name":"/metadata-name)SPhdr-content]list-content=bodynewsgroup-status=%x79/%x6E/%x6D/private-statusover-content=1*6(TABhdr-content)/7(TABhdr-content)*(TABhdr-n-content)private-status=token;exceptthevaluesinnewsgroup-status9.
5.
CapabilityLinesThissyntaxdefinesthegenericformofacapabilitylineinthecapabilitieslist(seeSection3.
3.
1).
capability-line=capability-entrycapability-entry=X-capability-entryX-capability-entry=capability-label*(WScapability-argument)capability-label=keywordcapability-argument=tokenThissyntaxdefinesthespecificcapabilityentriesforthecapabilitiesinthisspecification.
capability-entry=/hdr-capability/ihave-capability/implementation-capability/list-capability/mode-reader-capability/newnews-capability/over-capability/post-capability/reader-capabilityhdr-capability="HDR"ihave-capability="IHAVE"implementation-capability="IMPLEMENTATION"*(WStoken)FeatherStandardsTrack[Page95]RFC3977NetworkNewsTransferProtocol(NNTP)October2006list-capability="LIST"1*(WSkeyword)mode-reader-capability="MODE-READER"newnews-capability="NEWNEWS"over-capability="OVER"[WS"MSGID"]post-capability="POST"reader-capability="READER"version-line="VERSION"1*(WSversion-number)version-number=nzDIGIT*5DIGIT9.
6.
LISTVariantsThissectiondefinesmorespecificallythekeywordsfortheLISTcommandandthesyntaxofthecorrespondingresponsecontents.
;activelist-arguments=/"ACTIVE"[WSwildmat]list-content=/list-active-contentlist-active-content=active-groups-list;active.
timeslist-arguments=/"ACTIVE.
TIMES"[WSwildmat]list-content=/list-active-times-contentlist-active-times-content=*(newsgroup-nameSPA1*DIGITSPAnewsgroup-creatorCRLF)newsgroup-creator=U-TEXT;distrib.
patslist-arguments=/"DISTRIB.
PATS"list-content=/list-distrib-pats-contentlist-distrib-pats-content=*(1*DIGIT":"wildmat":"distributionCRLF)distribution=token;headerslist-arguments=/"HEADERS"[WS("MSGID"/"RANGE")]list-content=/list-headers-contentlist-headers-content=*(header-meta-nameCRLF)/*((metadata-name/":")CRLF);newsgroupslist-arguments=/"NEWSGROUPS"[WSwildmat]list-content=/list-newsgroups-contentlist-newsgroups-content=FeatherStandardsTrack[Page96]RFC3977NetworkNewsTransferProtocol(NNTP)October2006*(newsgroup-nameWSnewsgroup-descriptionCRLF)newsgroup-description=S-TEXT;overview.
fmtlist-arguments=/"OVERVIEW.
FMT"list-content=/list-overview-fmt-contentlist-overview-fmt-content="Subject:"CRLF"From:"CRLF"Date:"CRLF"Message-ID:"CRLF"References:"CRLF(":bytes"CRLF":lines"/"Bytes:"CRLF"Lines:")CRLF*((header-name":full"/metadata-name)CRLF)9.
7.
ArticlesThissyntaxdefinesthenon-terminal,whichrepresentstheformatofanarticleasdescribedinSection3.
6.
article=1*headerCRLFbodyheader=header-name":"[CRLF]SPheader-contentCRLFheader-content=*(S-CHAR/[CRLF]WS)body=*(*B-CHARCRLF)9.
8.
GeneralNon-terminalsThesenon-terminalsareusedatvariousplacesinthesyntaxandarecollectedhereforconvenience.
Afewofthesenon-terminalsarenotusedinthisspecificationbutareprovidedfortheconsistencyandconvenienceofextensionauthors.
multi-line-data-block=content-linesterminationcontent-lines=*([content-text]CRLF)content-textB-NONDOT)*B-CHARtermination=".
"CRLFarticle-number=1*16DIGITheader-name=1*A-NOTCOLONkeyword=ALPHA2*(ALPHA/DIGITmessage-id=""newsgroup-name=1*wildmat-exacttoken=1*P-CHARwildmat=wildmat-patternwildmat-pattern)wildmat-pattern=1*wildmat-itemwildmat-item=wildmat-exact/wildmat-wildwildmat-exact=%x22-29/%x2B/%x2D-3E/%x40-5A/%x5E-7E/FeatherStandardsTrack[Page97]RFC3977NetworkNewsTransferProtocol(NNTP)October2006UTF8-non-ascii;excludewildmat-wildbase64=*(4base64-char)[base64-terminal]base64-char=UPPER/LOWER/DIGITbase64-terminal=2base64-char"=="/3base64-char"=";Assortedspecialcharactersets;A-meansbasedonUS-ASCII,excludingcontrolsandSP;P-meansbasedonUTF-8,excludingcontrolsandSP;U-meansbasedonUTF-8,excludingNULCRandLF;B-meansbasedonbytes,excludingNULCRandLFA-CHAR=%x21-7EA-NOTCOLON=%x21-39/%x3B-7E;exclude":"A-NOTGT=%x21-3D/%x3F-7E;exclude">"P-CHAR=A-CHAR/UTF8-non-asciiU-CHAR=CTRL/TAB/SP/A-CHAR/UTF8-non-asciiU-NONTAB=CTRL/SP/A-CHAR/UTF8-non-asciiU-TEXT=P-CHAR*U-CHARB-CHAR=CTRL/TAB/SP/%x21-FFB-NONDOT=CTRL/TAB/SP/%x21-2D/%x2F-FF;exclude".
"ALPHA=UPPER/LOWER;useonlywhencase-insensitiveCR=%x0DCRLF=CRLFCTRL=%x01-08/%x0B-0C/%x0E-1FDIGIT=%x30-39nzDIGIT=%x31-39EOL=*(SP/TAB)CRLFLF=%x0ALOWER=%x61-7ASP=%x20SPA=1*SPTAB=%x09UPPER=%x41-5AUTF8-non-ascii=UTF8-2/UTF8-3/UTF8-4UTF8-2=%xC2-DFUTF8-tailUTF8-3=%xE0%xA0-BFUTF8-tail/%xE1-EC2UTF8-tail/%xED%x80-9FUTF8-tail/%xEE-EF2UTF8-tailUTF8-4=%xF0%x90-BF2UTF8-tail/%xF1-F33UTF8-tail/%xF4%x80-8F2UTF8-tailUTF8-tail=%x80-BFWS=1*(SP/TAB)Thefollowingnon-terminalsrequirespecialconsideration.
TheyrepresentsituationswherematerialSHOULDberestrictedtoUTF-8,butimplementationsMUSTbeabletocopewithothercharacterencodings.
Therefore,therearetwosetsofdefinitionsforthem.
FeatherStandardsTrack[Page98]RFC3977NetworkNewsTransferProtocol(NNTP)October2006ImplementationsMUSTacceptanycontentthatmeetsthissyntax:S-CHAR=%x21-FFS-NONTAB=CTRL/SP/S-CHARS-TEXT=(CTRL/S-CHAR)*B-CHARandMAYpasssuchcontentonunaltered.
Whengeneratingnewcontentorre-encodingexistingcontent,implementationsSHOULDconformtothissyntax:S-CHAR=P-CHARS-NONTAB=U-NONTABS-TEXT=U-TEXT9.
9.
ExtensionsandValidationThespecificationofaregisteredextensionMUSTincludeformalsyntaxthatdefinesadditionalformsforthefollowingnon-terminals:commandforeachnewcommandotherthanavariantoftheLISTcommand-thesyntaxofeachcommandMUSTbecompatiblewiththedefinitionof;command-datastreamforeachnewcommandthatimmediatelystreamsdata;command-continuationforeachnewcommandthatsendsfurthermaterialaftertheinitialcommandline-thesyntaxofeachcontinuationMUSTbeexactlywhatissenttotheserver,includinganyescapemechanismssuchas"dot-stuffing";initial-response-contentforeachnewresponsecodethathasarguments-thesyntaxofeachresponseMUSTbecompatiblewiththedefinitionof;multi-line-response-contentforeachnewresponsecodethathasamulti-lineresponse-thesyntaxMUSTshowtheresponseafterthelinescontainingtheresponsecodeandtheterminatingoctethavebeenremovedandany"dot-stuffing"undone;capability-entryforeachnewcapabilitylabel-thesyntaxofeachentryMUSTbecompatiblewiththedefinitionof;FeatherStandardsTrack[Page99]RFC3977NetworkNewsTransferProtocol(NNTP)October2006list-argumentsforeachnewvariantoftheLISTcommand-thesyntaxofeachentryMUSTbecompatiblewiththedefinitionof;list-contentforeachnewvariantoftheLISTcommand-thesyntaxMUSTshowtheresponseafterthelinescontainingthe215responsecodeandtheterminatingoctethavebeenremovedandany"dot-stuffing"undone.
The=/notationofABNF[RFC4234]andthenamingconventionsdescribedinSection9.
1SHOULDbeusedforthis.
Whenthesyntaxinthisspecification,orsyntaxbasedonit,isvalidated,itshouldbenotedthat:othenon-terminals,,,,anddescribebasicconceptsoftheprotocolandarenotreferredtobyanyotherrule;othenon-terminalisprovidedfortheconvenienceofextensionauthorsandisnotreferredtobyanyruleinthisspecification;oforthereasonsgivenabove,thenon-terminals,,andeachhavetwodefinitions;andothenon-terminalisdeliberatelynotdefined.
10.
InternationalisationConsiderations10.
1.
IntroductionandHistoricalSituationRFC977[RFC977]waswrittenatatimewheninternationalisationwasnotseenasasignificantissue.
Assuch,itwaswrittenontheassumptionthatallcommunicationwouldbeinASCIIanduseonlya7-bittransportlayer,althoughinpracticejustaboutallknownimplementationsare8-bitclean.
Sincethen,UsenetandNNTPhavespreadthroughouttheworld.
Intheabsenceofstandardsforhandlingtheissuesoflanguageandcharactersets,countries,newsgrouphierarchies,andindividualshavefoundavarietyofsolutionsthatworkforthembutthatarenotnecessarilyappropriateelsewhere.
Forexample,somehaveadoptedadefault8-bitcharactersetappropriatetotheirneeds(suchasISO/IEC8859-1inWesternEuropeorKOI-8inRussia),othershaveusedASCII(eitherUS-ASCIIornationalvariants)inheadersbutFeatherStandardsTrack[Page100]RFC3977NetworkNewsTransferProtocol(NNTP)October2006local16-bitcharactersetsinarticlebodies,andstillothershavegoneforacombinationofMIME[RFC2045]andUTF-8.
WiththeincreaseduseofMIMEinemail,itisbecomingmorecommontofindNNTParticlescontainingMIMEheadersthatidentifythecharactersetofthebody,butthisisfarfromuniversal.
Theresultingconfusiondoesnothelpinteroperability.
Onepointthathasbeengenerallyacceptedisthatarticlescancontainoctetswiththetopbitset,andNNTPisonlyexpectedtooperateon8-bitcleantransportpaths.
10.
2.
ThisSpecificationPartoftheroleofthispresentspecificationistoeliminatethisconfusionandpromoteinteroperabilityasfaraspossible.
Atthesametime,itisnecessarytoaccepttheexistenceofthepresentsituationandnotbreakexistingimplementationsandarrangementsgratuitously,eveniftheyarelessthanoptimal.
Therefore,thecurrentpracticedescribedabovehasbeentakenintoconsiderationinproducingthisspecification.
ThisspecificationextendsNNTPfromUS-ASCII[ANSI1986]toUTF-8[RFC3629].
Exceptinthetwoareasdiscussedbelow,UTF-8(whichisasupersetofUS-ASCII)ismandatory,andimplementationsMUSTNOTuseanyotherencoding.
Firstly,theuseofMIMEforarticleheadersandbodiesisstronglyrecommended.
However,givenwidelydivergentexistingpractices,anattempttorequireaparticularencodingandtaggingstandardwouldbeprematureatthistime.
Accordingly,thisspecificationallowstheuseofarbitrary8-bitdatainarticlessubjecttothefollowingrequirementsandrecommendations.
oThenamesofheaders(e.
g.
,"From"or"Subject")MUSTbeinUS-ASCII.
oHeadervaluesSHOULDuseUS-ASCIIoranencodingbasedonit,suchasRFC2047[RFC2047],untilsuchtimeasanotherapproachhasbeenstandardised.
Atpresent,8-bitencodings(includingUTF-8)SHOULDNOTbeusedbecausetheyarelikelytocauseinteroperabilityproblems.
oThecharactersetofarticlebodiesSHOULDbeindicatedinthearticleheaders,andthisSHOULDbedoneinaccordancewithMIME.
oWhereanarticleisobtainedfromanexternalsource,animplementationMAYpassitonandderivedatafromit(suchastheFeatherStandardsTrack[Page101]RFC3977NetworkNewsTransferProtocol(NNTP)October2006responsetotheHDRcommand),eventhoughthearticleorthedatadoesnotmeettheaboverequirements.
ImplementationsMUSTtransfersucharticlesanddatacorrectlyandunchanged;theyMUSTNOTattempttoconvertorre-encodethearticleorderiveddata.
(Nevertheless,aclientorserverMAYelectnottopostorforwardthearticleif,afterfurtherexaminationofthearticle,itdeemsitinappropriatetodoso.
)ThisrequirementaffectstheARTICLE(Section6.
2.
1),BODY(Section6.
2.
3),HDR(Section8.
5),HEAD(Section6.
2.
2),IHAVE(Section6.
3.
2),OVER(Section8.
3),andPOST(Section6.
3.
1)commands.
Secondly,thefollowingrequirementsareplacedonthenewsgroupslistreturnedbytheLISTNEWSGROUPScommand(Section7.
6.
6):oAlthoughthisspecificationallowsUTF-8fornewsgroupnames,theySHOULDberestrictedtoUS-ASCIIuntilasuccessortoRFC1036[RFC1036]standardisesanotherapproach.
8-bitencodingsSHOULDNOTbeusedbecausetheyarelikelytocauseinteroperabilityproblems.
oThenewsgroupdescriptionSHOULDbeinUS-ASCIIorUTF-8unlessanduntilasuccessortoRFC1036standardisesotherencodingarrangements.
8-bitencodingsotherthanUTF-8SHOULDNOTbeusedbecausetheyarelikelytocauseinteroperabilityproblems.
oImplementationsthatobtainthisdatafromanexternalsourceMUSThandleitcorrectlyevenifitdoesnotmeettheaboverequirements.
Implementations(inparticular,clients)MUSThandlesuchdatacorrectly.
10.
3.
OutstandingIssuesWhiletheprimaryuseofNNTPisfortransmittingarticlesthatconformtoRFC1036(Netnewsarticles),itisalsousedforotherformats(seeAppendixA).
Itisthereforemostappropriatethatinternationalisationissuesrelatedtoarticleformatsbeaddressedintherelevantspecifications.
ForNetnewsarticles,thisisanysuccessortoRFC1036.
Foremailmessages,itisRFC2822[RFC2822].
Ofcourse,anyarticletransmittedviaNNTPneedstoconformtothisspecificationaswell.
RestrictingnewsgroupnamestoUTF-8isnotacompletesolution.
Inparticular,whennewnewsgroupnamesarecreatedorauserisaskedtoenteranewsgroupname,someschemeofcanonicalisationwillneedtotakeplace.
ThisspecificationdoesnotattempttodefinethatFeatherStandardsTrack[Page102]RFC3977NetworkNewsTransferProtocol(NNTP)October2006canonicalization;furtherworkisneededinthisarea,inconjunctionwiththearticleformatspecifications.
Untilsuchspecificationsarepublished,implementationsSHOULDmatchnewsgroupnamesoctetbyoctet.
Itisanticipatedthatanyapprovedschemewillbeapplied"attheedges",andthereforeoctet-by-octetcomparisonwillcontinuetoapplytomost,ifnotall,usesofnewsgroupnamesinNNTP.
Inthemeantime,anyimplementationexperimentingwithUTF-8newsgroupnamesisstronglycautionedthatafuturespecificationmayrequirethatthosenamesbecanonicalizedwhenusedwithNNTPinawaythatisnotcompatiblewiththeirexperiments.
SincetheprimaryuseofNNTPiswithNetnews,andsincenewsgroupdescriptionsarenormallydistributedthroughspeciallyformattedarticles,itisrecommendedthattheinternationalisationissuesrelatedtothembeaddressedinanysuccessortoRFC1036.
11.
IANAConsiderationsThisspecificationrequiresIANAtokeeparegistryofcapabilitylabels.
TheinitialcontentsofthisregistryarespecifiedinSection3.
3.
4.
AsdescribedinSection3.
3.
3,labelsbeginningwithXarereservedforprivateuse,whileallothernamesareexpectedtobeassociatedwithaspecificationinanRFConthestandardstrackordefininganIESG-approvedexperimentalprotocol.
DifferententriesintheregistryMUSTusedifferentcapabilitylabels.
DifferententriesintheregistryMUSTNOTusethesamecommandname.
Forthispurpose,variantsdistinguishedbyasecondorsubsequentkeyword(e.
g.
,"LISTHEADERS"and"LISTOVERVIEW.
FMT")countasdifferentcommands.
Ifthereisaneedfortwoextensionstousethesamecommand,asingleharmonisedspecificationMUSTberegistered.
12.
SecurityConsiderationsThissectionismeanttoinformapplicationdevelopers,informationproviders,andusersofthesecuritylimitationsinNNTPasdescribedbythisdocument.
Thediscussiondoesnotincludedefinitivesolutionstotheproblemsrevealed,thoughitdoesmakesomesuggestionsforreducingsecurityrisks.
FeatherStandardsTrack[Page103]RFC3977NetworkNewsTransferProtocol(NNTP)October200612.
1.
PersonalandProprietaryInformationNNTP,becauseitwascreatedtodistributenetworknewsarticles,willforwardwhateverinformationisstoredinthosearticles.
Specificationofthatinformationisoutsidethisscopeofthisdocument,butitislikelythatsomepersonaland/orproprietaryinformationisavailableinsomeofthosearticles.
Itisveryimportantthatdesignersandimplementersprovideinformativewarningstouserssothatpersonaland/orproprietaryinformationinmaterialthatisaddedautomaticallytoarticles(e.
g.
,inheaders)isnotdisclosedinadvertently.
Additionally,effectiveandeasilyunderstoodmechanismstomanagethedistributionofnewsarticlesSHOULDbeprovidedtoNNTPServeradministrators,sothattheyareabletoreportwithconfidencethelikelyspreadofanyparticularsetofnewsarticles.
12.
2.
AbuseofServerLogInformationAserverisinthepositiontosavesessiondataaboutauser'srequeststhatmightidentifytheirreadingpatternsorsubjectsofinterest.
Thisinformationisclearlyconfidentialinnature,anditshandlingcanbeconstrainedbylawincertaincountries.
Peopleusingthisprotocoltoprovidedataareresponsibleforensuringthatsuchmaterialisnotdistributedwithoutthepermissionofanyindividualsthatareidentifiablebythepublishedresults.
12.
3.
WeakAuthenticationandAccessControlThereisnouser-basedortoken-basedauthenticationinthebasicNNTPspecification.
Accessisnormallycontrolledbyserverconfigurationfiles.
ThosefilesspecifyaccessbyusingdomainnamesorIPaddresses.
However,thisspecificationdoespermitthecreationofextensionstoNNTPforsuchpurposes;onesuchextensionis[NNTP-AUTH].
Whileincludingsuchmechanismsisoptional,doingsoisstronglyencouraged.
Othermechanismsarealsoavailable.
Forexample,aproxyservercouldbeputinplacethatrequiresauthenticationbeforeconnectingviatheproxytotheNNTPserver.
12.
4.
DNSSpoofingManyexistingNNTPimplementationsauthorizeincomingconnectionsbycheckingtheIPaddressofthatconnectionagainsttheIPaddressesobtainedviaDNSlookupsoflistsofdomainnamesgiveninlocalconfigurationfiles.
ServersthatusethistypeofauthenticationandclientsthatfindaserverbydoingaDNSlookupoftheservernamerelyveryheavilyontheDomainNameService,andarethusFeatherStandardsTrack[Page104]RFC3977NetworkNewsTransferProtocol(NNTP)October2006generallypronetosecurityattacksbasedonthedeliberatemisassociationofIPaddressesandDNSnames.
ClientsandserversneedtobecautiousinassumingthecontinuingvalidityofanIPnumber/DNSnameassociation.
Inparticular,NNTPclientsandserversSHOULDrelyontheirnameresolverforconfirmationofanIPnumber/DNSnameassociation,ratherthancachetheresultofprevioushostnamelookups.
Manyplatformsalreadycancachehostnamelookupslocallywhenappropriate,andtheySHOULDbeconfiguredtodoso.
Itisproperfortheselookupstobecached,however,onlywhentheTTL(TimeToLive)informationreportedbythenameservermakesitlikelythatthecachedinformationwillremainuseful.
IfNNTPclientsorserverscachetheresultsofhostnamelookupsinordertoachieveaperformanceimprovement,theyMUSTobservetheTTLinformationreportedbyDNS.
IfNNTPclientsorserversdonotobservethisrule,theycouldbespoofedwhenapreviouslyaccessedserver'sIPaddresschanges.
Asnetworkrenumberingisexpectedtobecomeincreasinglycommon,thepossibilityofthisformofattackwillincrease.
Observingthisrequirementthusreducesthispotentialsecurityvulnerability.
Thisrequirementalsoimprovestheload-balancingbehaviourofclientsforreplicatedserversusingthesameDNSnameandreducesthelikelihoodofauser'sexperiencingfailureinaccessingsitesthatusethatstrategy.
12.
5.
UTF-8IssuesUTF-8[RFC3629]permitsonlycertainsequencesofoctetsanddesignatesothersaseithermalformedor"illegal".
TheUnicodestandardidentifiesanumberofsecurityissuesrelatedtoillegalsequencesandforbidstheirgenerationbyconformingimplementations.
ImplementationsofthisspecificationMUSTNOTgeneratemalformedorillegalsequencesandSHOULDdetectthemandtakesomeappropriateaction.
Thiscouldincludethefollowing:oGeneratinga501responsecode.
oReplacingsuchsequencesbythesequence%xEF.
BF.
BD,whichencodesthe"replacementcharacter"U+FFFD.
oClosingtheconnection.
oReplacingsuchsequencesbya"guessed"validsequence(basedonpropertiesoftheUTF-8encoding).
FeatherStandardsTrack[Page105]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Inthelastcase,theimplementationMUSTensurethatanyreplacementcannotbeusedtobypassvalidityorsecuritychecks.
Forexample,theillegalsequence%xC0.
A0isanover-longencodingforspace(%x20).
Ifitisreplacedbythecorrectencodinginacommandline,thisneedstohappenbeforethecommandlineisparsedintoindividualarguments.
Ifthereplacementcameafterparsing,itwouldbepossibletogenerateanargumentwithanembeddedspace,whichisforbidden.
Useofthe"replacementcharacter"doesnothavethisproblem,sinceitispermittedwherevernon-US-ASCIIcharactersare.
ImplementationsSHOULDuseoneofthefirsttwosolutionswherethegeneralstructureoftheNNTPstreamremainsintactandSHOULDclosetheconnectionifitisnolongerpossibletoparseitsensibly.
12.
6.
CachingofCapabilityListsTheCAPABILITIEScommandprovidesacapabilitylist,whichisinformationaboutthecurrentcapabilitiesoftheserver.
Wheneverthereisarelevantchangetotheserverstate,theresultsofthiscommandarerequiredtochangeaccordingly.
Inmostsituations,thecapabilitieslistinagivenserverstatewillnotchangefromsessiontosession;forexample,agivenextensionwillbeinstalledpermanentlyonaserver.
Someclientsmaythereforewishtorememberwhichextensionsaserversupportstoavoidthedelayofanadditionalcommandandresponse,particularlyiftheyopenmultipleconnectionsinthesamesession.
However,informationaboutextensionsrelatedtosecurityandprivacyMUSTNOTbecached,sincethiscouldallowavarietyofattacks.
Forexample,consideraserverthatpermitstheuseofcleartextpasswordsonlinksthatareencryptedbutnototherwise:[Initialconnectionset-upcompleted.
][S]200NNTPServiceReady,postingpermitted[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]NEWNEWS[S]POST[S]XENCRYPT[S]LISTACTIVENEWSGROUPS[S].
[C]XENCRYPT[Clientandservernegotiateencryptiononthelink][S]283EncryptedlinkestablishedFeatherStandardsTrack[Page106]RFC3977NetworkNewsTransferProtocol(NNTP)October2006[C]CAPABILITIES[S]101Capabilitylist:[S]VERSION2[S]READER[S]NEWNEWS[S]POST[S]XSECRET[S]LISTACTIVENEWSGROUPS[S].
[C]XSECRETfredflintstone[S]290PasswordforfredacceptedIftheclientcachesthelastcapabilitieslist,thenonthenextsessionitwillattempttouseXSECRETonanunencryptedlink:[Initialconnectionset-upcompleted.
][S]200NNTPServiceReady,postingpermitted[C]XSECRETfredflintstone[S]483OnlypermittedonsecurelinksThisexposesthepasswordtoanyeavesdropper.
Whiletheprimarycauseofthisispassingasecretwithoutfirstcheckingthesecurityofthelink,cachingofcapabilitylistscanincreasetherisk.
Anysecurityextensionshouldincluderequirementstocheckthesecuritystateofthelinkinamannerappropriatetothatextension.
Cachingshouldnormallyonlybeconsideredforanonymousclientsthatdonotuseanysecurityorprivacyextensionsandforwhichthetimerequiredforanadditionalcommandandresponseisanoticeableissue.
13.
AcknowledgementsThisdocumentistheresultofmucheffortbythepresentandpastmembersoftheNNTPWorkingGroup,chairedbyRussAllberyandNedFreed.
Itcouldnothavebeenproducedwithoutthem.
TheauthoracknowledgestheoriginalauthorsofNNTPasdocumentedinRFC977[RFC977]:BrianKantorandPhilLapsey.
Theauthorgratefullyacknowledgesthefollowing:oTheworkoftheNNTPcommitteechairedbyEliotLear.
Theorganizationofthisdocumentwasinfluencedbythelastavailableversionfromthisworkinggroup.
AspecialthankstoEliotforgenerouslyprovidingtheoriginalmachine-readablesourcesforthatdocument.
FeatherStandardsTrack[Page107]RFC3977NetworkNewsTransferProtocol(NNTP)October2006oTheworkoftheDRUMSworkinggroup,specificallyRFC1869[RFC1869],thatdrovetheoriginalthinkingthatledtotheCAPABILITIEScommandandtheextensionsmechanismdetailedinthisdocument.
oTheauthorsofRFC2616[RFC2616]forprovidingspecificandrelevantexamplesofsecurityissuesthatshouldbeconsideredforHTTP.
SincemanyofthesameconsiderationsexistforNNTP,thoseexamplesthatarerelevanthavebeenincludedherewithsomeminorrewrites.
oThecommentsandadditionalinformationprovidedbythefollowingindividualsinpreparingoneormoreoftheprogenitorsofthisdocument:RussAllberyWayneDavisonChrisLewisTomLimoncelliEricSchnoebelenRichSalzThisworkwasmotivatedbytheworkofvariousnewsreaderauthorsandnewsserverauthors,includingthoselistedbelow:RickAdamsOriginalauthoroftheNNTPextensionstotheRNnewsreaderandlastmaintainerofBnews.
StanBarberOriginalauthoroftheNNTPextensionstothenewsreadersthatarepartofBnews.
GeoffCollyerOriginalauthoroftheOVERVIEWdatabaseproposalandoneoftheoriginalauthorsofCNEWS.
DanCurryOriginalauthorofthexvnewsnewsreader.
WayneDavisonAuthorofthefirstthreadingextensionstotheRNnewsreader(commonlycalledTRN).
GeoffHustonOriginalauthorofANUNEWS.
FeatherStandardsTrack[Page108]RFC3977NetworkNewsTransferProtocol(NNTP)October2006PhilLapseyOriginalauthoroftheUNIXreferenceimplementationforNNTP.
IainLeaOriginalmaintaineroftheTINnewsreader.
ChrisLewisFirstknownimplementeroftheAUTHINFOGENERICextension.
RichSalzOriginalauthorofINN.
HenrySpencerOneoftheoriginalauthorsofCNEWS.
KimStormOriginalauthoroftheNNnewsreader.
Otherpeoplewhocontributedtothisdocumentinclude:MatthiasAndreeGregAndrukDanielBarclayMaurizioCodognoMarkCrispinAndrewGierthJuergenHelbingScottHollenbeckUrsJanssenCharlesLindseyAdeLovettDavidMagdaKenMurchisonFrancoisPetillonPeterRobinsonRobSiemborskiHowardSwinehartRuudvanTolJeffreyVinocurErikWarmelinkTheauthorthanksthemallandapologisestoanyoneomitted.
Finally,thepresentauthorgratefullyacknowledgesthevastamountofworkputintopreviousversionsbythepreviousauthor:StanBarberFeatherStandardsTrack[Page109]RFC3977NetworkNewsTransferProtocol(NNTP)October200614.
References14.
1.
NormativeReferences[ANSI1986]AmericanNationalStandardsInstitute,"CodedCharacterSet-7-bitAmericanStandardCodeforInformationInterchange",ANSIX3.
4,1986.
[RFC977]Kantor,B.
andP.
Lapsley,"NetworkNewsTransferProtocol",RFC977,February1986.
[RFC2045]Freed,N.
andN.
Borenstein,"MultipurposeInternetMailExtensions(MIME)PartOne:FormatofInternetMessageBodies",RFC2045,November1996.
[RFC2047]Moore,K.
,"MIME(MultipurposeInternetMailExtensions)PartThree:MessageHeaderExtensionsforNon-ASCIIText",RFC2047,November1996.
[RFC2119]Bradner,S.
,"KeywordsforuseinRFCstoIndicateRequirementLevels",BCP14,RFC2119,March1997.
[RFC3629]Yergeau,F.
,"UTF-8,atransformationformatofISO10646",STD63,RFC3629,November2003.
[RFC4234]Crocker,D.
,Ed.
andP.
Overell,"AugmentedBNFforSyntaxSpecifications:ABNF",RFC4234,October2005.
[RFC4648]Josefsson,S.
,"TheBase16,Base32,andBase64DataEncodings",RFC4648,October2006.
[TF.
686-1]InternationalTelecommunicationsUnion-Radio,"Glossary,ITU-RRecommendationTF.
686-1",ITU-RRecommendationTF.
686-1,October1997.
14.
2.
InformativeReferences[NNTP-AUTH]Vinocur,J.
,Murchison,K.
,andC.
Newman,"NetworkNewsTransferProtocol(NNTP)ExtensionforAuthentication",RFC4643,October2006.
[NNTP-STREAM]Vinocur,J.
andK.
Murchison,"NetworkNewsTransferProtocol(NNTP)ExtensionforStreamingFeeds",RFC4644,October2006.
FeatherStandardsTrack[Page110]RFC3977NetworkNewsTransferProtocol(NNTP)October2006[NNTP-TLS]Murchison,K.
,Vinocur,J.
,andC.
Newman,"UsingTransportLayerSecurity(TLS)withNetworkNewsTransferProtocol(NNTP)",RFC4642,October2006.
[RFC1036]Horton,M.
andR.
Adams,"StandardforinterchangeofUSENETmessages",RFC1036,December1987.
[RFC1305]Mills,D.
,"NetworkTimeProtocol(Version3)Specification,ImplementationandAnalysis",RFC1305,March1992.
[RFC1869]Klensin,J.
,Freed,N.
,Rose,M.
,Stefferud,E.
,andD.
Crocker,"SMTPServiceExtensions",STD10,RFC1869,November1995.
[RFC2616]Fielding,R.
,Gettys,J.
,Mogul,J.
,Frystyk,H.
,Masinter,L.
,Leach,P.
,andT.
Berners-Lee,"HypertextTransferProtocol--HTTP/1.
1",RFC2616,June1999.
[RFC2629]Rose,M.
,"WritingI-DsandRFCsusingXML",RFC2629,June1999.
[RFC2822]Resnick,P.
,"InternetMessageFormat",RFC2822,April2001.
[RFC2980]Barber,S.
,"CommonNNTPExtensions",RFC2980,October2000.
[ROBE1995]Robertson,R.
,"FAQ:Overviewdatabase/NOVGeneralInformation",January1995.
Thereisnodefinitivecopyofthisdocumentknowntotheauthor.
ItwaspreviouslypostedastheUsenetarticle[SALZ1992]Salz,R.
,"ManualPageforwildmat(3)fromtheINN1.
4distribution,Revision1.
10",April1992.
Thereisnodefinitivecopyofthisdocumentknowntotheauthor.
FeatherStandardsTrack[Page111]RFC3977NetworkNewsTransferProtocol(NNTP)October2006AppendixA.
InteractionwithOtherSpecificationsNNTPismostoftenusedfortransferringarticlesthatconformtoRFC1036[RFC1036](sucharticlesarecalled"Netnewsarticles"here).
ItisalsosometimesusedfortransferringemailmessagesthatconformtoRFC2822[RFC2822](sucharticlesarecalled"emailarticles"here).
Inthissituation,articlesmustconformbothtothisspecificationandtothatotherone;thisappendixdescribessomerelevantissues.
A.
1.
HeaderFoldingNNTPallowsaheaderlinetobefolded(byinsertingaCRLFpair)beforeanyspaceorTABcharacter.
BothemailandNetnewsarticlesarerequiredtohaveatleastoneoctetotherthanspaceorTABoneachheaderline.
Thus,foldingcanonlyhappenatonepointineachsequenceofconsecutivespacesorTABs.
Netnewsarticlesarefurtherrequiredtohavetheheadername,colon,andfollowingspaceallonthefirstline;foldingmayonlyhappenbeyondthatspace.
Finally,somenon-conformingsoftwarewillremovetrailingspacesandTABsfromaline.
Therefore,itmightbeinadvisabletofoldaheaderafteraspaceorTAB.
Formaximumsafety,headerlinesSHOULDconformtothefollowingsyntaxratherthantothatinSection9.
7.
header=header-name":"SP[header-content]CRLFheader-content=[WS]token*([CRLF]WStoken)A.
2.
Message-IDsEveryarticlehandledbyanNNTPserverMUSThaveauniquemessage-id.
Forthepurposesofthisspecification,amessage-idisanarbitraryopaquestringthatmerelyneedstomeetcertainsyntacticrequirementsandisjustawaytorefertothearticle.
BecausethereisasignificantriskthatoldarticleswillbereinjectedintotheglobalUsenetsystem,RFC1036[RFC1036]requiresthatmessage-idsaregloballyuniqueforalltime.
Thisspecificationstatesthatmessage-idsarethesameifandonlyiftheyconsistofthesamesequenceofoctets.
Otherspecificationsmaydefinetwodifferentsequencesasbeingequalbecausetheyareputtinganinterpretationonparticularcharacters.
RFC2822[RFC2822]hasaconceptof"quoted"and"escaped"characters.
Itthereforeconsidersthethreemessage-ids:FeatherStandardsTrack[Page112]RFC3977NetworkNewsTransferProtocol(NNTP)October2006asbeingidentical.
Therefore,anNNTPimplementationhandingemailarticlesmustensurethatonlyoneofthesethreeappearsintheprotocolandthattheothertwoareconvertedtoitasandwhennecessary,suchaswhenaclientcheckstheresultsofaNEWNEWScommandagainstaninternaldatabaseofmessage-ids.
NotethatRFC1036[RFC1036]nevertreatstwodifferentstringsasbeingidentical.
Itssuccessor(asofthetimeofwriting)restrictsthesyntaxofmessage-idssothat,wheneverRFC2822wouldtreattwostringsasequivalent,onlyoneofthemisvalid(intheaboveexample,onlythefirststringisvalid).
Thisspecificationdoesnotdescribehowthemessage-idofanarticleisdetermined;itmaybededucedfromthecontentsofthearticleorderivedfromsomeexternalsource.
Iftheserverisalsoconformingtoanotherspecificationthatcontainsadefinitionofmessage-idcompatiblewiththisone,theserverSHOULDusethosemessage-ids.
Acommonapproach,andonethatSHOULDbeusedforemailandNetnewsarticles,istoextractthemessage-idfromthecontentsofaheaderwithname"Message-ID".
Thismaynotbeassimpleascopyingtheentireheadercontents;itmaybenecessarytostripoffcommentsandundoquoting,ortoreduce"equivalent"message-idstoacanonicalform.
IfanarticleisobtainedthroughtheIHAVEcommand,therewillbeamessage-idprovidedwiththecommand.
TheserverMAYeitheruseitordetermineonefromthearticlecontents.
However,whicheveritdoes,itSHOULDensurethat,iftheIHAVEcommandisrepeatedwiththesameargumentandarticle,itwillberecognizedasaduplicate.
Ifanarticledoesnotcontainamessage-idthattheservercanidentify,itMUSTsynthesizeone.
Thiscould,forexample,beasimplesequencenumberorbebasedonthedateandtimewhenthearticlearrived.
WhenemailorNetnewsarticlesarehandled,aMessage-IDheaderSHOULDbeaddedtoensureglobalconsistencyanduniqueness.
Notethat,becausethemessage-idmightnothavebeenderivedfromtheMessage-IDheaderinthearticle,thefollowingexampleislegitimate(thoughunusual):FeatherStandardsTrack[Page113]RFC3977NetworkNewsTransferProtocol(NNTP)October2006[C]HEAD[S]2210[S]Path:pathost!
demo!
whitehouse!
not-for-mail[S]Message-ID:[S]From:"DemoUser"[S]Newsgroups:misc.
test[S]Subject:Iamjustatestarticle[S]Date:6Oct199804:38:40-0500[S]Organization:AnExampleNet,Uncertain,Texas[S].
A.
3.
ArticlePostingAsfarasNNTPisconcerned,thePOSTandIHAVEcommandsprovidethesamebasicfacilitiesinaslightlydifferentway.
However,theyhaveratherdifferentintentions.
TheIHAVEcommandisintendedfortransmittingconformingarticlesbetweenasystemofNNTPservers,withallarticlesperhapsalsoconformingtoanotherspecification(e.
g.
,allarticlesareNetnewsarticles).
Itisexpectedthattheclientwillalreadyhavedoneanynecessaryvalidation(orthatithasinturnobtainedthearticlefromathirdpartythathasdoneso);therefore,thecontentsSHOULDbeleftunchanged.
Incontrast,thePOSTcommandisintendedforusewhenanend-userisinjectinganewlycreatedarticleintoasuchasystem.
ThearticlebeingtransferredmightnotbeaconformingemailorNetnewsarticle,andtheserverisexpectedtovalidateitand,ifnecessary,toconvertittotherightformforonwarddistribution.
Thisisoftendonebyaseparatepieceofsoftwareontheserverinstallation;ifso,theNNTPserverSHOULDpasstheincomingarticletothatsoftwareunaltered,makingnoattempttofiltercharacters,tofoldorlimitlines,ortoprocesstheincomingtextotherwise.
ThePOSTcommandcanfailinvariousways,andclientsshouldbepreparedtore-sendanarticle.
Whendoingso,however,itisoftenimportanttoensure(asfaraspossible)thatthesamemessage-idisallocatedtobothattemptssothattheserver,orotherservers,canrecognizethetwoarticlesasduplicates.
InthecaseofemailorNetnewsarticles,therefore,thepostedarticleSHOULDcontainaheaderwiththename"Message-ID",andthecontentsofthisheaderSHOULDbeidenticaloneachattempt.
TheserverSHOULDensurethattwoPOSTedarticleswiththesamecontentsforthisheaderarerecognizedasidenticalandthatthesamemessage-idisallocated,whetherornotthosecontentsaresuitableforuseasthemessage-id.
FeatherStandardsTrack[Page114]RFC3977NetworkNewsTransferProtocol(NNTP)October2006AppendixB.
SummaryofCommandsThissectioncontainsalistofeverycommanddefinedinthisdocument,orderedbycommandnameandbyindicatingcapability.
Orderedbycommandname:|Command|Indicatingcapability|Definition||ARTICLE|READER|Section6.
2.
1||BODY|READER|Section6.
2.
3||CAPABILITIES|mandatory|Section5.
2||DATE|READER|Section7.
1||GROUP|READER|Section6.
1.
1||HDR|HDR|Section8.
5||HEAD|mandatory|Section6.
2.
2||HELP|mandatory|Section7.
2||IHAVE|IHAVE|Section6.
3.
2||LAST|READER|Section6.
1.
3||LIST|LIST|Section7.
6.
1||LISTACTIVE.
TIMES|LIST|Section7.
6.
4||LISTACTIVE|LIST|Section7.
6.
3||LISTDISTRIB.
PATS|LIST|Section7.
6.
5||LISTHEADERS|HDR|Section8.
6||LISTNEWSGROUPS|LIST|Section7.
6.
6||LISTOVERVIEW.
FMT|OVER|Section8.
4||LISTGROUP|READER|Section6.
1.
2||MODEREADER|MODE-READER|Section5.
3||NEWGROUPS|READER|Section7.
3||NEWNEWS|NEWNEWS|Section7.
4||NEXT|READER|Section6.
1.
4||OVER|OVER|Section8.
3||POST|POST|Section6.
3.
1||QUIT|mandatory|Section5.
4||STAT|mandatory|Section6.
2.
4|FeatherStandardsTrack[Page115]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Orderedbyindicatingcapability:|Command|Indicatingcapability|Definition||CAPABILITIES|mandatory|Section5.
2||HEAD|mandatory|Section6.
2.
2||HELP|mandatory|Section7.
2||QUIT|mandatory|Section5.
4||STAT|mandatory|Section6.
2.
4||HDR|HDR|Section8.
5||LISTHEADERS|HDR|Section8.
6||IHAVE|IHAVE|Section6.
3.
2||LIST|LIST|Section7.
6.
1||LISTACTIVE|LIST|Section7.
6.
3||LISTACTIVE.
TIMES|LIST|Section7.
6.
4||LISTDISTRIB.
PATS|LIST|Section7.
6.
5||LISTNEWSGROUPS|LIST|Section7.
6.
6||MODEREADER|MODE-READER|Section5.
3||NEWNEWS|NEWNEWS|Section7.
4||OVER|OVER|Section8.
3||LISTOVERVIEW.
FMT|OVER|Section8.
4||POST|POST|Section6.
3.
1||ARTICLE|READER|Section6.
2.
1||BODY|READER|Section6.
2.
3||DATE|READER|Section7.
1||GROUP|READER|Section6.
1.
1||LAST|READER|Section6.
1.
3||LISTGROUP|READER|Section6.
1.
2||NEWGROUPS|READER|Section7.
3||NEXT|READER|Section6.
1.
4|FeatherStandardsTrack[Page116]RFC3977NetworkNewsTransferProtocol(NNTP)October2006AppendixC.
SummaryofResponseCodesThissectioncontainsalistofeveryresponsecodedefinedinthisdocumentandindicateswhetheritismulti-line,whichcommandscangenerateit,whatargumentsithas,andwhatitsmeaningis.
Responsecode100(multi-line)Generatedby:HELPMeaning:helptextfollows.
Responsecode101(multi-line)Generatedby:CAPABILITIESMeaning:capabilitieslistfollows.
Responsecode111Generatedby:DATE1argument:yyyymmddhhmmssMeaning:serverdateandtime.
Responsecode200Generatedby:initialconnection,MODEREADERMeaning:serviceavailable,postingallowed.
Responsecode201Generatedby:initialconnection,MODEREADERMeaning:serviceavailable,postingprohibited.
Responsecode205Generatedby:QUITMeaning:connectionclosing(theserverimmediatelyclosestheconnection).
Responsecode211The211responsecodehastwocompletelydifferentforms,dependingonwhichcommandgeneratedit:(notmulti-line)Generatedby:GROUP4arguments:numberlowhighgroupMeaning:groupselected.
(multi-line)Generatedby:LISTGROUP4arguments:numberlowhighgroupMeaning:articlenumbersfollow.
FeatherStandardsTrack[Page117]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Responsecode215(multi-line)Generatedby:LISTMeaning:informationfollows.
Responsecode220(multi-line)Generatedby:ARTICLE2arguments:nmessage-idMeaning:articlefollows.
Responsecode221(multi-line)Generatedby:HEAD2arguments:nmessage-idMeaning:articleheadersfollow.
Responsecode222(multi-line)Generatedby:BODY2arguments:nmessage-idMeaning:articlebodyfollows.
Responsecode223Generatedby:LAST,NEXT,STAT2arguments:nmessage-idMeaning:articleexistsandselected.
Responsecode224(multi-line)Generatedby:OVERMeaning:overviewinformationfollows.
Responsecode225(multi-line)Generatedby:HDRMeaning:headersfollow.
Responsecode230(multi-line)Generatedby:NEWNEWSMeaning:listofnewarticlesfollows.
Responsecode231(multi-line)Generatedby:NEWGROUPSMeaning:listofnewnewsgroupsfollows.
Responsecode235Generatedby:IHAVE(secondstage)Meaning:articletransferredOK.
Responsecode240Generatedby:POST(secondstage)Meaning:articlereceivedOK.
FeatherStandardsTrack[Page118]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Responsecode335Generatedby:IHAVE(firststage)Meaning:sendarticletobetransferred.
Responsecode340Generatedby:POST(firststage)Meaning:sendarticletobeposted.
Responsecode400GenericresponseandgeneratedbyinitialconnectionMeaning:servicenotavailableornolongeravailable(theserverimmediatelyclosestheconnection).
Responsecode401Genericresponse1argument:capability-labelMeaning:theserverisinthewrongmode;theindicatedcapabilityshouldbeusedtochangethemode.
Responsecode403GenericresponseMeaning:internalfaultorproblempreventingactionbeingtaken.
Responsecode411Generatedby:GROUP,LISTGROUPMeaning:nosuchnewsgroup.
Responsecode412Generatedby:ARTICLE,BODY,GROUP,HDR,HEAD,LAST,LISTGROUP,NEXT,OVER,STATMeaning:nonewsgroupselected.
Responsecode420Generatedby:ARTICLE,BODY,HDR,HEAD,LAST,NEXT,OVER,STATMeaning:currentarticlenumberisinvalid.
Responsecode421Generatedby:NEXTMeaning:nonextarticleinthisgroup.
Responsecode422Generatedby:LASTMeaning:nopreviousarticleinthisgroup.
Responsecode423Generatedby:ARTICLE,BODY,HDR,HEAD,OVER,STATMeaning:noarticlewiththatnumberorinthatrange.
FeatherStandardsTrack[Page119]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Responsecode430Generatedby:ARTICLE,BODY,HDR,HEAD,OVER,STATMeaning:noarticlewiththatmessage-id.
Responsecode435Generatedby:IHAVE(firststage)Meaning:articlenotwanted.
Responsecode436Generatedby:IHAVE(eitherstage)Meaning:transfernotpossible(firststage)orfailed(secondstage);tryagainlater.
Responsecode437Generatedby:IHAVE(secondstage)Meaning:transferrejected;donotretry.
Responsecode440Generatedby:POST(firststage)Meaning:postingnotpermitted.
Responsecode441Generatedby:POST(secondstage)Meaning:postingfailed.
Responsecode480GenericresponseMeaning:commandunavailableuntiltheclienthasauthenticateditself.
Responsecode483GenericresponseMeaning:commandunavailableuntilsuitableprivacyhasbeenarranged.
Responsecode500GenericresponseMeaning:unknowncommand.
Responsecode501GenericresponseMeaning:syntaxerrorincommand.
FeatherStandardsTrack[Page120]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Responsecode502GenericresponseandgeneratedbyinitialconnectionMeaningfortheinitialconnectionandtheMODEREADERcommand:servicepermanentlyunavailable(theserverimmediatelyclosestheconnection).
Meaningforallothercommands:commandnotpermitted(andthereisnowayfortheclienttochangethis).
Responsecode503GenericresponseMeaning:featurenotsupported.
Responsecode504GenericresponseMeaning:errorinbase64-encoding[RFC4648]ofanargument.
AppendixD.
ChangesfromRFC977IngeneraleveryattempthasbeenmadetoensurethattheprotocolspecificationinthisdocumentiscompatiblewiththeversionspecifiedinRFC977[RFC977]andthevariousfacilitiesadoptedfromRFC2980[RFC2980].
However,therehavebeenanumberofchanges,somecompatibleandsomenot.
Thisappendixliststhesechanges.
ItisnotguaranteedtobeexhaustiveorcorrectandMUSTNOTbereliedon.
oAformalsyntaxspecification(Section9)hasbeenadded.
oThedefaultcharactersetischangedfromUS-ASCII[ANSI1986]toUTF-8[RFC3629](notethatUS-ASCIIisasubsetofUTF-8).
ThismatterisdiscussedfurtherinSection10.
oAllarticlesarerequiredtohaveamessage-id,eliminatingthe""placeholderusedinRFC977insomeresponses.
oThenewsgroupnamematchingcapabilitiesalreadydocumentedinRFC977("wildmats",Section4)areclarifiedandextended.
Thenewfacilities(e.
g.
,theuseofcommasandexclamationmarks)areallowedwhereverwildmatsappearintheprotocol.
oSupportforpipeliningofcommands(Section3.
5)ismademandatory.
FeatherStandardsTrack[Page121]RFC3977NetworkNewsTransferProtocol(NNTP)October2006oTheprinciplesbehindresponsecodes(Section3.
2)havebeentidiedup.
Inparticular:*thex8xresponsecodefamily,formerlyusedforprivateextensions,isnowreservedforauthenticationandprivacyextensions;*thex9xresponsecodefamily,formerlyintendedfordebuggingfacilities,arenowreservedforprivateextensions;*the502and503genericresponsecodes(Section3.
2.
1)havebeenredefined;*new401,403,480,483,and504genericresponsecodeshavebeenadded.
oTherulesforarticlenumbering(Section6)havebeenclarified(alsoseeSection6.
1.
1.
2).
oTheSLAVEcommand(whichwasill-defined)isremovedfromtheprotocol.
oFour-digityearsarepermittedintheNEWNEWS(Section7.
4)andNEWGROUPS(Section7.
3)commands(two-digityearsarestillpermitted).
Theoptionaldistributionparametertothesecommandshasbeenremoved.
oTheLISTcommand(Section7.
6.
1)isgreatlyextended;theoriginalisavailableasLISTACTIVE,whilenewvariantsincludeACTIVE.
TIMES,DISTRIB.
PATS,andNEWSGROUPS.
Anew"m"statusflagisaddedtotheLISTACTIVEresponse.
oAnewCAPABILITIEScommand(Section5.
2)allowsclientstodeterminewhatfacilitiesaresupportedbyaserver.
oTheDATEcommand(Section7.
1)isadoptedfromRFC2980effectivelyunchanged.
oTheLISTGROUPcommand(Section6.
1.
2)isadoptedfromRFC2980.
Anoptionalrangeargumenthasbeenadded,andthe211initialresponselinenowhasthesameformatasthe211responsefromtheGROUPcommand.
oTheMODEREADERcommand(Section5.
3)isadoptedfromRFC2980anditsmeaningandeffectsclarified.
oTheXHDRcommandinRFC2980hasbeenformalisedasthenewHDR(Section8.
5)andLISTHEADERS(Section8.
6)commands.
FeatherStandardsTrack[Page122]RFC3977NetworkNewsTransferProtocol(NNTP)October2006oTheXOVERcommandinRFC2980hasbeenformalisedasthenewOVER(Section8.
3)andLISTOVERVIEW.
FMT(Section8.
4)commands.
Theformercanbeappliedtoamessage-idaswellastoarange.
oTheconceptofarticlemetadata(Section8.
1)hasbeenformalised,allowingtheBytesandLinespseudo-headerstobedeprecated.
ClientauthorsshouldnoteinparticularthatlackofsupportfortheCAPABILITIEScommandisagoodindicationthattheserverdoesnotsupportthisspecification.
FeatherStandardsTrack[Page123]RFC3977NetworkNewsTransferProtocol(NNTP)October2006Author'sAddressCliveD.
W.
FeatherTHUSplc322RegentsParkRoadLondonN32QQUnitedKingdomPhone:+442084956138Fax:+448700519937EMail:clive@demon.
netURI:http://www.
davros.
org/FeatherStandardsTrack[Page124]RFC3977NetworkNewsTransferProtocol(NNTP)October2006FullCopyrightStatementCopyright(C)TheInternetSociety(2006).
Thisdocumentissubjecttotherights,licensesandrestrictionscontainedinBCP78,andexceptassetforththerein,theauthorsretainalltheirrights.
Thisdocumentandtheinformationcontainedhereinareprovidedonan"ASIS"basisandTHECONTRIBUTOR,THEORGANIZATIONHE/SHEREPRESENTSORISSPONSOREDBY(IFANY),THEINTERNETSOCIETYANDTHEINTERNETENGINEERINGTASKFORCEDISCLAIMALLWARRANTIES,EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOANYWARRANTYTHATTHEUSEOFTHEINFORMATIONHEREINWILLNOTINFRINGEANYRIGHTSORANYIMPLIEDWARRANTIESOFMERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.
IntellectualPropertyTheIETFtakesnopositionregardingthevalidityorscopeofanyIntellectualPropertyRightsorotherrightsthatmightbeclaimedtopertaintotheimplementationoruseofthetechnologydescribedinthisdocumentortheextenttowhichanylicenseundersuchrightsmightormightnotbeavailable;nordoesitrepresentthatithasmadeanyindependentefforttoidentifyanysuchrights.
InformationontheprocedureswithrespecttorightsinRFCdocumentscanbefoundinBCP78andBCP79.
CopiesofIPRdisclosuresmadetotheIETFSecretariatandanyassurancesoflicensestobemadeavailable,ortheresultofanattemptmadetoobtainagenerallicenseorpermissionfortheuseofsuchproprietaryrightsbyimplementersorusersofthisspecificationcanbeobtainedfromtheIETFon-lineIPRrepositoryathttp://www.
ietf.
org/ipr.
TheIETFinvitesanyinterestedpartytobringtoitsattentionanycopyrights,patentsorpatentapplications,orotherproprietaryrightsthatmaycovertechnologythatmayberequiredtoimplementthisstandard.
PleaseaddresstheinformationtotheIETFatietf-ipr@ietf.
org.
AcknowledgementFundingfortheRFCEditorfunctionisprovidedbytheIETFAdministrativeSupportActivity(IASA).
FeatherStandardsTrack[Page125]
月神科技是由江西月神科技有限公司运营的一家自营云产品的IDC服务商,提供香港安畅、香港沙田、美国CERA、成都电信等机房资源,月神科技有自己的用户群和拥有创宇认证,并且也有电商企业将业务架设在月神科技的平台上。本次带来的是全场八折促销,续费同价。并且上新了国内成都高防服务器,单机100G集群1.2T真实防御,上层屏蔽UDP,可定制CC策略。非常适合网站用户。官方网站:https://www.ysi...
说明一下:gcorelabs的俄罗斯远东机房“伯力”既有“Virtual servers”也有“CLOUD SERVICES”,前者是VPS,后者是云服务器,不是一回事;由于平日大家习惯把VPS和云服务器当做一回事儿,所以这里要特别说明一下。本次测评的是gcorelabs的cloud,也就是云服务器。 官方网站:https://gcorelabs.com 支持:数字加密货币、信用卡、PayPal...
青云互联怎么样?青云互联是一家成立于2020年的主机服务商,致力于为用户提供高性价比稳定快速的主机托管服务,目前提供有美国免费主机、香港主机、韩国服务器、香港服务器、美国云服务器,香港安畅cn2弹性云限时首月五折,15元/月起;可选Windows/可自定义配置,让您的网站高速、稳定运行。点击进入:青云互联官方网站地址青云互联优惠码:八折优惠码:ltY8sHMh (续费同价)青云互联香港云服务器活动...
servicetemporarilyunavailable为你推荐
企业ssl证书ssl证书多少钱一年?德国iphone禁售令德国IPHONE多少钱?急~播放flash全国企业信息查询想查一个企业的信息,哪个网站提供信息查询?360公司迁至天津天津360公司?360开户哪家好?360开户费多少?360推广怎么样?360效果怎么样?360和百度相比哪个更合适?yixingjia通配符的使用方法抢米网怎么用小米商城可以快速抢到手机!大侠们 帮帮忙!宜人贷官网宜人贷是不是骗人的温州商标注册温州注册商标需要注册公司吗2828商机网千元能办厂?28商机网是真的吗?
成都虚拟主机 中文域名注册 中国万网域名 电信测速器 singlehop 免备案空间 网络星期一 建站代码 空间出租 域名转向 789电视网 网站卫士 如何用qq邮箱发邮件 鲁诺 江苏双线服务器 最漂亮的qq空间 闪讯官网 免费邮件服务器 php服务器 免费php空间 更多