🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #244461

Re: [Dialog] Detatching Attachments from Received Articles

#244461
From: Bernd Rose
Date: Tue, 18 Jan 2011 18:35
88 lines
5948 bytes
On Tue, 18-th Jan 2011 00:51:00 -0600 Sqwertz wrote:

> The files in my Binary folder are miniscule compared to the files in
> my Data folder.  And I can still view the binary data for hundreds of
> 200K messages when I view the raw message, yet my Binary folder is
> only about 2 megs.  My Data folder is almost a gigabyte.
> 
> Looking at the data files in my Binary folder they are all messages
> from the same person, probably the only person in the group, who posts
> multipart messages.  That seems to be the only purpose of the binary
> folder - collecting multipart messages.  The files to this group are
> usually only 150K or so (alt.binaries.food) and multiparts are
> discouraged. 

I didn't have the time this morning to address all variants, that come
into play, here. Yes, only multipart binaries of newsgroups are stored
inside the Binary subfolder, when no save-path for a group is defined
(specifically or via default group options). All other binaries go to
the msg*.dat files (again, only when no save-path is defined).

If a save-path has been set for a group *prior* to downloading the
body of either a multipart message or a single message, the binary
attachments are written to that folder. Inside the msg*.dat files only
a reference message "Attachment saved: ..." is written and all parts
of a multipart message are removed from Binary subfolder. (After the
save to the target folder was successful.) Btw: "Normal" multipart
messages in groups without defined save-folder get /no/ entry inside
the msg*.dat files.

After a message body has been downloaded (with either save-path set or 
not), the actions I described above (and in my last posting) have been
executed. There is no way, that I'm aware of, to reverse these actions.
I.e.: You can neither detach a binary nor re-attach it.

You can clean the Binary subfolder to get rid of the multipart binaries.
But since you don't keep any useful content, you could have deleted the
message (or at least its body) inside Dialog, anyway.

You can not remove binaries stored inside msg*.dat files without at 
least deleting the body of the message inside Dialog.

You can save any binary later on as often as you like to as many folders
as you like, as long as Dialog is able to access the original binary
(inside msg*.dat / Binary subfolder / specific save-path folder). But
this will *not* affect the original save position.

> And yes, I was referring to newsgroup posts, not email. 

Okay.
 
> Could this have been an older version of Dialog that unattached the
> files rather than having them stored in the data directory?  I know
> there was a database format change in one of the three available
> versions still out there as there's a warning about a database
> conversion after you run it the first time.  It has probably been a
> few years since I saw the detached message pointers and I have been
> using the newest ("unreleased") version since then.

No. This behavior has nothing to do with Dialog (database) version. 
Just make sure to define a default (and/or maybe a couple of specific)
save-path(es) inside Group options. Afterwards, all *newly retrieved*
attachments in those Newsgroups will be detached to that save-position.

*There's nothing you can do about already retrieved message bodies.*

Okay. There are some possibilities, like deleting the bodies and 
retrieving them for a second time (as long as your preferred server
still carries those messages). Or you could save those messages to
*.mbx files, delete the messages inside Dialog, manipulate the *.mbx
files outside Dialog and re-import the manipulated *.mbx files. But
that's hard stuff...

What you *never ever* should try is editing msg*.dat files directly! 
The index files of the Dialog database contain offset pointers which
will get out of sync, when you delete or insert bytes (= characters)
inside msg*.dat files.

Btw.: I wrote this morning, that mail attachments will always be
stored inside the msg*.dat files (IMHO, to ensure correct mail
archiving). Dialog is a bit inconsistent in this matter, because it
shouldn't show the save-path option for mail folders in the first 
place - following this design decision. But although it /does/ show 
the save-path option, an entry will /not/ be used. Attachments still 
go into the msg*.dat files. And if you (also) want them to be saved 
somewhere else, you have to save them manually.

HTH.
Bernd
Technical Details
Message-ID: <1nh0p87f88mh1.dlg@b.rose.tmpbox.news.arcor.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.musoftware.de!wum.musoftware.de!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail
References: <1f3acf06olppk$.dlg@sqwertz.com> <gk8u26ibet59$.dlg@b.rose.tmpbox.news.arcor.de> <7fg551r6j185.dlg@sqwertz.com>

Show Full Headers
Complete Article Headers
Message-ID: <1nh0p87f88mh1.dlg@b.rose.tmpbox.news.arcor.de>
Subject: Re: [Dialog] Detatching Attachments from Received Articles
Date: Tue, 18 Jan 2011 19:35:56 +0100
From: Bernd Rose <b.rose.tmpbox@expires-2011-01-31.arcornews.de>
References: <1f3acf06olppk$.dlg@sqwertz.com> <gk8u26ibet59$.dlg@b.rose.tmpbox.news.arcor.de> <7fg551r6j185.dlg@sqwertz.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin1!goblin.stu.neva.ru!news.musoftware.de!wum.musoftware.de!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.41 (195708b3.131.286)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Lines: 88
Organization: Arcor
NNTP-Posting-Date: 18 Jan 2011 19:36:53 CET
NNTP-Posting-Host: 9d370ef7.newsspool4.arcor-online.net
X-Trace: DXC=JeXW0b<OUZJAa;
 :RKVJ>LE4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOK`ASh@[LYP6M19JlNQl`::ISk[1KoVnS6N6N@jPAc;
 OdI
X-Complaints-To: usenet-abuse@arcor.de