Dec 31
Free Software I use client side virtual folders a bit for my mail. Specifically, I tag messages with IMAP flags like todo and important, and then in Icedove / Thunderbird, I set up a special folder as a saved search which shows message that are either unseen, or marked todo in my inbox. It works rather well, and I use the same set-up on my laptop, and work and home desktop machines.

But it's not very useful on my phone, which doesn't allow such sophisticated client side behaviour. My phone mail applications shows the most recent 25 messages in a folder, but there are times when it would be really useful to look up messages that are labeled as important but rather old. It would be time consuming to look through the older messages, and difficult to find the one I want anyway.

As a result, I've been looking at the possibility of using virtual server side folders using dovecot on my Debian mail server. I was put off by the documentation which left a lot of questions unanswered.

Here's how I did it on Debian. First of all edit the config file /etc/dovecot/dovecot.conf, back up this file first, so you can restore working behaviour if something goes wrong.

#
# You have to add the default namespace
# which is normally NOT added explicitly before
#
namespace private {
  prefix =
  separator = /
  # the next line is very specific to where you keep your mail
  location = mbox:~/Mail/:INBOX=/var/mail/%u
  list = yes
  inbox = yes
  subscriptions = yes
  hidden = no
}

#
# Then add the virtual namespace
#
namespace private {
    prefix = virtual/
    separator = /
    # pick where the virtual folders will be
    location = virtual:~/Mail/virtual
    list = yes
    inbox = no
    subscriptions = yes
    hidden = no
}
 


You must also add the virtual folder plugin.

##
## IMAP specific settings
##

protocol imap {

  # ... you need to enable the plugin
  mail_plugins = virtual
 


Now restart dovecot and check your normal folders are working.

/etc/init.d/dovecot restart
 
Note that I found dovecot will generally not serve physical folders correctly if the virtual mail folder (even if empty) does not exist. I consider this a bug, but one that needs to be worked around, at least for me.

If that's all done and working you can begin to create virtual folders. I created two directories within my ~/Mail/virtual folders; which were inbox-todo and inbox-important respectively. Inside each I put the following files.


# ~/Mail/virtual/inbox-todo/dovecot-virtual
INBOX
  OR (OR (OR KEYWORD $TODO KEYWORD todo) KEYWORD $label4) unseen
 
which shows all unseen and mail labelled todo in my inbox and

# ~/Mail/virtual/inbox-important/dovecot-virtual
INBOX
  OR (OR KEYWORD $IMPORTANT KEYWORD important) KEYWORD $label1
 
which shows only important mail in my inbox.

It seems to be working, my normal folders appear to be working perfectly correctly (but I'll know better in a couple more hours/days); my phone has successfully subscribed to the two virtual folders, though the folder list shows a number of files which I'm certain it should not, again, this looks like a dovecot bug to be honest.

Posted by Colin Turner

Defined tags for this entry: , , ,
Bookmark Virtual folders with Dovecot and Debian  at del.icio.us Digg Virtual folders with Dovecot and Debian Mixx Virtual folders with Dovecot and Debian Bloglines Virtual folders with Dovecot and Debian Technorati Virtual folders with Dovecot and Debian Fark this: Virtual folders with Dovecot and Debian Bookmark Virtual folders with Dovecot and Debian  at YahooMyWeb Bookmark Virtual folders with Dovecot and Debian  at Furl.net Bookmark Virtual folders with Dovecot and Debian  at reddit.com Bookmark Virtual folders with Dovecot and Debian  at blinklist.com Bookmark Virtual folders with Dovecot and Debian  at Spurl.net Bookmark Virtual folders with Dovecot and Debian  at NewsVine Bookmark Virtual folders with Dovecot and Debian  at Simpy.com Bookmark Virtual folders with Dovecot and Debian  at blogmarks Bookmark Virtual folders with Dovecot and Debian  with wists Bookmark Virtual folders with Dovecot and Debian  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Feb 2
I finally got sorted out to regrade the ADSL connection for Gondolin, the download speed is now (potentially) 8096 kbps, but perhaps more importantly for the server aspect of these things, the upload speed is improved by about a factor of two to 448 kbps. I haven't done any substantive testing yet, but it's certainly going to help me accessing the server from work.

Posted by ct

Defined tags for this entry:
Bookmark Bandwidth regrade  at del.icio.us Digg Bandwidth regrade Mixx Bandwidth regrade Bloglines Bandwidth regrade Technorati Bandwidth regrade Fark this: Bandwidth regrade Bookmark Bandwidth regrade  at YahooMyWeb Bookmark Bandwidth regrade  at Furl.net Bookmark Bandwidth regrade  at reddit.com Bookmark Bandwidth regrade  at blinklist.com Bookmark Bandwidth regrade  at Spurl.net Bookmark Bandwidth regrade  at NewsVine Bookmark Bandwidth regrade  at Simpy.com Bookmark Bandwidth regrade  at blogmarks Bookmark Bandwidth regrade  with wists Bookmark Bandwidth regrade  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 13
php programming So, in order to post that rant about PHP and SimpleXML I had to fix a problem that seems to have spontaneously arisen with Drupal (this content management system). For some reason it wasn't persisting login information, at least from firefox (sorry - iceweasel here on my Debian system). It's interesting to note, reading about the bug, that it has been around for literally months and doesn't seem to have been nailed. So, anyway, I've installed some beta of Drupal, and yes, it now seems to be fixed... If I could only solve the problem that I can't "uncollapse" parts of the content now. UPDATE: OK, this seems to be a problem with firefox version 2, or probably really the CSS file for it. It works with Galeon, or when I tell firefox to fake being IE .

Posted by ct

Defined tags for this entry: , ,
Bookmark Drupal Login Problems  at del.icio.us Digg Drupal Login Problems Mixx Drupal Login Problems Bloglines Drupal Login Problems Technorati Drupal Login Problems Fark this: Drupal Login Problems Bookmark Drupal Login Problems  at YahooMyWeb Bookmark Drupal Login Problems  at Furl.net Bookmark Drupal Login Problems  at reddit.com Bookmark Drupal Login Problems  at blinklist.com Bookmark Drupal Login Problems  at Spurl.net Bookmark Drupal Login Problems  at NewsVine Bookmark Drupal Login Problems  at Simpy.com Bookmark Drupal Login Problems  at blogmarks Bookmark Drupal Login Problems  with wists Bookmark Drupal Login Problems  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Jun 13
So, here's a new look for gondolin. Essentially I'm trying out a CMS because I'm too lazy to always have to use some web editor. I hope you like it, it's easy to reverse if not!

Posted by ct

Defined tags for this entry:
Bookmark New look for the website  at del.icio.us Digg New look for the website Mixx New look for the website Bloglines New look for the website Technorati New look for the website Fark this: New look for the website Bookmark New look for the website  at YahooMyWeb Bookmark New look for the website  at Furl.net Bookmark New look for the website  at reddit.com Bookmark New look for the website  at blinklist.com Bookmark New look for the website  at Spurl.net Bookmark New look for the website  at NewsVine Bookmark New look for the website  at Simpy.com Bookmark New look for the website  at blogmarks Bookmark New look for the website  with wists Bookmark New look for the website  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!