[PLUG] Handling Caught Spam

Aaron Burt aaron at speakeasy.org
Sun Oct 26 18:29:02 UTC 2003


[References and cites restored to customary location]
On 25 Oct 2003, Jon Jacob wrote:
> On Sat, 2003-10-25 at 17:44, Jack Morgan wrote:
> > On Sat, Oct 25, 2003 at 05:12:47PM +0000, Jon Jacob wrote:
> > > With my current promailrc file, procmail creates the file
> > > $HOME/mail/caughtmail and then appends it.  There is no folder.  If I
> >
> > If you want procmail to create a Maildir folder instead of a mbox files
> > add a trailing / like so...
> >
> > :0
> > * ^Contect-Type:.*html
> > $MAILDIR/junk/
>
> The real issue for me right now is making it so the spam goes to a mail
> reader neutral format.

It's doing that right now.  It's being written to an MBOX-format file
called $HOME/mail/caughtmail

> That is so I can set my Evolution to read it in my file and my other
> users to set their mail reader to read it in their own file.

Just for kicks, I installed Evo 1.4 (such things are trivial for a Debian
user on a fast connection ;) and found that at least for me, it defaulted
to MBOX format for its folders.  Unfortunately, it doesn't directly
support creating a folder that links to something in ~/mail, but I was
able to do it by hand.

What I did was:
1. Create a folder in Evolution.  Any name you like (I'm using CaughtSpam
   for this example), create it under Local Folders or as a subfolder.
   (I tried both.)
2. Right-click on the folder, hit Properties... and make sure it says that
   the Current store format is "mbox".  If not, choose "mbox (Local
   delivery)" for New store format.  I left "Index body contents" checked.
3. Exit Evolution.  I don't know if it's necessary, but it's what I did.
4. Go to a shell.
5a. If the folder is directly under Local Folders, type:
 ln -fs ~/mail/caughtspam ~/evolution/local/CaughtSpam/mbox
5b. If the folder is a subfolder under, say, Inbox, type:
 ln -fs ~/mail/caughtspam ~/evolution/local/Inbox/subfolders/CaughtSpam/mbox
6. Start Evolution and marvel at your magical mail folder.  It seems to
   pick up changes when I click to another folder, but I don't know how
   typical this is of Evo.

WARNING:  Just for kicks, I tried seeing what happens when I tell Evo to
delete the folder.  I figured it'd delete the symlink and leave the
original mail folder alone.  Well, quite rudely, it truncates the
mail folder to a zero-length file before deleting the link to it.

Being the sort of idiot who runs destructive tests without backups, I
lost two mailboxes.  Not ones I care about, mind.

> If it were just Evolution, I can forget the caughtspam or procmail thing
> and have Evolution filter on the spam header.  What I would like is a
> general solution.

Header flags.  Let the users choose what to filter, and provide directions
for Evo, Outbreak, Eudora and Procmail.  They can even choose what
spam-score to filter at.  I've been tempted to start filtering spam into
separate "probably" and "definitely" folders so I can check the former and
trash the latter in good conscience.

IMAP is also a way to go about having server-side filtering, assuming you
have a good IMAP server and email client.





More information about the PLUG mailing list