Thunderbird Oddness [Edited]

Something strange has been annoying me for ages in Thunderbird: when double-clicking on a message of my Inbox, a new window did indeed open as expected, but instead of heaving a simple window displaying the mail, I got a compose window, with my default address in the “From:” field, the original addressee of the mail (usually me) in the “To:” field, and the message as body…:grr:

This would not have been too bad if, when closing the window, that damned dialog box asking “Do you want to save the message” didn’t appear!!!

So tonight I seriously looked at the problem, and found the oddness that caused me so much frustration: if the folder “Inbox” is selected as folder to store the Drafts or the Templates (in the Properties -> Copies & Folders setting pane), such a stupid phenomenon will occur.

So I selected the folders “Drafts” and “Templates” to respectively store my drafts and my templates (I know, this is the default setting… :?), and that simply solved my problem! 😀

[EDITION]
:dead: That only solved my problem until the next time I started Thunderbird…I’m getting sick of it! 🙁

RoundCube Webmail

Webmails are very useful to check your mails everywhere on the planet: all you need is a web browser (Firefox rulez :-P).

Until recently, I was used to Horde, a very complete web portal, that offers webmail functionality through Horde-Imp. It’s even a bit too complete. It was hard for the newbie I was to find my way through the multiple configuration options of Horde.

I recently tried RoundCube, and I was totally conquered by its simplicity and beauty 😮 !

RoundCube

It’s a free (under GPL) webmail developed with the AJAX technology, enabling cool possibilities like dragging ‘n dropping mails from a folder to another, e-mail address auto-completion, and even spell check!

Try it by yourself with the demo account.

Maildrop + Postfix

Our server runs Postfix as MTA: it’s a very powerful mail server, highly configurable, and extremely efficient when used in combination with amavis, spamassassin, mysql, cyrus-sasl and courier-imap.

Spamassassin is really THE indispensable tool in today’s internet environment, where about 80% of e-mails are spams!

Before using spamassassin, I simply couldn’t dissociate abusive e-mails from real ones (of course, words like viagra or pe*is elongation in the subject were clear hints 😉 ). Then, once spamassassin has been put in place (through the use of amavis), detected spams were marked with “***SPAM***” in the subject. It was then simply a matter of setting a rule in Thunderbird in order to get rid of those fu***in spam e-mails.

But still, a problem remains when using a webmail: spam e-mails were simply displayed in the Inbox folder, which really irritated me in the end. So I looked for a solution to automatically sort e-mail at reception time… That’s where maildrop appears!

Maildrop is normally delivered with the courier MTA, but as we are using Postfix, we had to emerge it:

# emerge maildrop -va

Some postfix adaptation is needed so that it uses maildrop to deliver the mail instead of the postfix/virtual process (when using virtual users of course). Add or adapt the following in /etc/postfix/main.cf

virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
mailbox_command = /usr/bin/maildrop

Then make sure to have a line like the following in /etc/postfix/master.cf (of course, the user vmail has to exist on your system):

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d ${user}@${nexthop} \
${user} ${nexthop} ${sender}

All mail users being stored in a database, simply replace the “virtual:” in the destination field of the transport table by “maildrop:” for the domains you want to serve using maildrop. The others will simply continue to perform as before.

The last thing to do is to create either a /etc/maildroprc or a ~/.mailfilter file (or both of course). The former defines rules to be applied to all accounts, while the latter does the same but only for the accounts that belongs to a specific user. Here is what such a file may look like to automatically move detected spam to a Spam folder (and create it if necessary):

`test -d $DEFAULT`
if( $RETURNCODE == 1 )
{
`/usr/bin/mkdir -p $DEFAULT`
`/usr/bin/rmdir $DEFAULT`
`/usr/bin/maildirmake $DEFAULT`
}
if ((/^X-Spam-Status: YES/))
{
`test -d $DEFAULT/.Spam`
if( $RETURNCODE == 1 )
{
`/usr/bin/maildirmake $DEFAULT/.Spam`
`echo "INBOX.Spam" >> $DEFAULT/courierimapsubscribed`
}
to "$DEFAULT/.Spam/"
}

Make sure the permission on that file is 600, and that the file is owned by that specific user.

Those steps have made the internet a better and safer place to live with 😉