Article View: news.software.nntp
Article #70513Re: Decoding messages with attachments
From: Colin Wilson
Date: Wed, 29 Dec 2004 04:14
Date: Wed, 29 Dec 2004 04:14
43 lines
2629 bytes
2629 bytes
Princess Morgiah wrote: > I'm trying to write my own newsreader/downloader and have stumbled > upon a slight problem. > > When I download a message from usenet, how do I find out: > - whether or not the message has attachments? 3 ways: 1. If it's a MIME message, it may have an attachment. Binary attachments are usually base64 encoded, though I've seen uuencoded attachments with MIME ContentTransferEncoding set to UUENCODE or x-uuencode. I've never seen a MIME message containing a yEnc attachment yet. 2. Messages that contain a line starting with (eg.) 'begin 644' may contain a uuencoded binary attachment, which terminates with a line containing just 'end'. The line that contains 'begin 644' usually contains the filename too. There may be plain text before the attachment. There may be some plain text after the attachment. Sometimes that's followed by another 'begin 644', and another binary attachment. I'm not sure if the 644 is significant. I've seen many other 3 digit combinations. XanaNews always treats them the same and it hasn't failed yet! Some bozos like to post messages with lines starting with 'begin 644' - even though there's no attachment, for a laugh to crash badly written newsreaders. Ho ho ho. 3. Messages that contain lines starting with =yBegin. They end with lines starting with =yEnd. See the yEnc spec for the rest of the details. They're quite easy to decode. I think that the only 'approved' way of adding an attachment to a news message is with MIME. Nevertheless, the most common thing is probably still non-MIME messages containing uuencoded attachments. -- Colin - Author of XanaNews
Technical Details
Message-ID:
<1104293695.18972.0@spandrell.news.uk.clara.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!mephistopheles.news.clara.net!news.clara.net!spandrell.news.uk.clara.netReferences:
<54jAd.12755$op.747589@phobos.telenet-ops.be>Show Full Headers
Complete Article Headers
Message-ID: <1104293695.18972.0@spandrell.news.uk.clara.net> Subject: Re: Decoding messages with attachments Date: Wed, 29 Dec 2004 04:14:55 +0000 From: "Colin Wilson" <colin@wilsonc.demon.co.uk> References: <54jAd.12755$op.747589@phobos.telenet-ops.be> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!mephistopheles.news.clara.net!news.clara.net!spandrell.news.uk.clara.net Newsgroups: news.software.nntp User-Agent: XanaNews/1.17.1.2 X-Complaints-To: abuse@clara.net (please include full headers) X-Trace: f0139180b72d0c4c7786272bc641d0750530e9f05a08d2a696b7006841d22f3f NNTP-Posting-Date: Wed, 29 Dec 2004 04:14:55 +0000 Lines: 43