[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Mail Trouble

Filed under: General — Thomas @ 20:32

2006-09-24
20:32

Mail has not been good to me this year. Like everyone else I'm getting increasing amounts of spam. But there are other problems I'm having that aren't helping me either. For one thing, my work account (which I used POP to access, but I leave mails on the server because I want to be able to read my mail from any computer) has repeatedly given me every mail I ever received (including spam) as new mail a bunch of times now. Today it did three times in a row, leaving me with over 9000 unread mails in my inbox.

I don't know if it's Evolution or the mail server, but in any case, apparently that account also supports IMAP so I'm switching to that. After I did, I had 29000 mails in my INBOX - since really, the folders I made on my local computer were not on the server. So apparently on the server I had this many mails. Jikes.

Also over the last year, Evolution's spamassassin has been mostly useless, letting through 90% of spam mails. Today I wanted to dig a little deeper on why this was happening.

So I figured out that you can save a mail to disk, then use spamassassin -t on the mail to get a nice report. Sure enough, all these obvious spam mails got high scores. I don't know however how Evolution invokes spamassasin - does anybody know ?.

I found some sites that mentioned you can create your own rule to pipe through spamassassin using -e to get a return code. Except on my FC5 machine, -e obviously does not work. After some digging through the unreadable mass of Perl code, I found this line:

eval { $exitvalue ||= !$iter->run(@targets); };

(God how I hate Perl with a passion these days).
Removing the exitvalue part from that line suddenly made it return proper values again. It didn't actually fix Evolution, so I assume it does not use spamassassin -e, but at least it allows me to use the expensive custom rule (expensive since it forks for every mail, which will take some time on this 29000 mail INBOX).

Curiously, FC5 ships a 3.1.3 version, and the 3.0.3 version of FC4 does not have the strange construct above.

So now I'm going to slowly filter all my mailboxes, move my POP folders to my IMAP server after cleaning, and after that try and go through my INBOX to clean out and reply to people. (I came to work especially for this today because of course my home ADSL resets every fifteen minutes, but that's a different story.)

Anyway, if anyone wants to share some experiences about SpamAssassin and FC5, let me know.

On a side note, I seriously don't understand Evolution sometimes. To oversimplify, let's pretend that there are only two mail protocols, POP and IMAP, the difference between which mere mortals should not have to understand, and let's pretend that mere mortals really only send and receive mail, and to this end basically have the folders INBOX, Drafts, Sent, and Trash.

I would expect these four folders to be pretty much treated the same, and not be different depending on the protocol. I'm sure there are valid technical reasons why this is hard, but on a high-level, this is what you would want, right ?

Turns out that as far as I can tell, all POP mails arrive *in the same folder*, no matter what, which is "Inbox" under "On This Computer". But you can customize drafts and sent - even though no really I would like to customize Inbox, because that's the only one *worth* customizing. However, with IMAP, you get a nice separate section on the same level as "On This Computer". Sigh.

UPDATE:

  • After filtering a selection of 1000 mails with my new rule that forks through spamassassin, Evolution just gave up with a "too many open files error". Few programs deal with this correctly, but of course few programs manage to run out of them in the first place :)
  • after digging around in the latest source tarball (3.1.5), it seems this bug is what I'm seeing above. I'll rebuild and hopefully this will help Evolution as well.

    No Comments

    No comments yet.

    RSS feed for comments on this post. TrackBack URL

    Sorry, the comment form is closed at this time.

    picture