[Spambayes] Missing Junk E-mail folder
Tony Meyer
tameyer at ihug.co.nz
Fri Nov 11 04:54:11 CET 2005
> If the user presses the "Delete" button on the folder, the entire
> folder
> generally gets moved to "Deleted Items" - however, the folder is still
> actually valid while it is there - spambayes just stores the "ID"
> of the
> folder, and this does not change when the folder is moved - even
> when moved
> to deleted items.
It would be possible to write code to detect this, though, wouldn't
it? Iterate up through the folder hierarchy of the spam folder, and
if the "Deleted Items" folder is found, then create a new folder with
the same name & location as the spam folder's original (presumably
some sort of constant for this purpose).
> A problem with restoring it is simply that SpamBayes doesn't
> actually store
> the name, or its location (as above, just its binary ID) A
> solution to this
> would be to detect the error and always create a folder of a
> specified name
> in the "root" (this name should be whatever the default name used
> by setup
> is - I can't recall now). This means SpamBayes may not recreate
> the folder
> with the original name or location, but at least would have a valid
> folder
> to work with.
It would be possible to store the original name and location
somewhere (e.g. one of the config files) and use this to recreate the
folder when necessary.
(The one part of this that might be nice for the official plug-in
would be to look for a folder of the same name and location if this
error does occur, and if it's found, automatically change the spam
folder id to the id of that new folder. That would mean that
SpamBayes would fix itself if a user deleted the spam folder and then
created a new one with the same name and id, thinking that that would
work).
One thing I forgot in my original reply: if the Outlook being used is
2003, then you can use the Outlook "Junk Mail" folder for the
spambayes spam folder (this is the default, IIRC), and I don't
believe it's possible to delete this. However, the problem still
arises with the unsure folder (although it's probably a little less
common for users to delete that), to which all of this still applies.
=Tony.Meyer
--
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.
More information about the SpamBayes
mailing list