Create Mailboxes on Delivery

Aristotelis arisg at noc.uoa.gr
Sat Jun 26 16:42:38 EDT 2004


On Sat, 26 Jun 2004 ms419 at freezone.co.uk wrote:

> On Jun 24, 2004, at 1:24 PM, John Wade wrote:


  Hello, I haven't seen the patch yet, since I'm out
of the cyrus-testing environment we have. But still
I do believe that this idea is a bad idea.

> 
> Let me explain why I'm so hung up on this auto-create feature. I've a 
> couple dozen mailboxes in which I store email, news, & voicemail. 
> Messages are sorted by a big procmail recipe. I periodically run a 
> script to rename each mailbox "mailbox.<date>" (to keep them from 
> growing too big). The script doesn't recreate "mailbox" - to avoid 
> backing up empty mailboxes the next time it's run.


   Ok this is the first scenario. 
> 
> More important, I sort spam and messages with large attachments into 
> sub-mailboxes of their intended mailboxes ("mailbox.junk" & 
> "mailbox.large"). I sort large messages to avoid waiting for my 
> portable to synchronize while I'm on the road. While this is 
> accomplished with a single rule in procmail (to append ".junk" or 
> ".large" to a "mailbox" variable), I currently must maintain twice a 
> couple dozen mailboxes. This takes time - and if I make a mistake, the 
> junk ends up in my INBOX : P

  And this is the second scenario.

  This two scenarios can have another solution without going to 
strange implementations and patches. As I have figured out you
are using procmail. The simple solution is to use sieve. So what
you can do is something like this :

 You move your procmail rules to sieve. So you know that the email
is delivered and then it is processed by sieve.(use ltmp)  (I also 
assume that you filter the messages of the first scenario with
procmail rules, so these rules will be also moved to sieve).
 So you can have a sieve rule that is like : 
if the message is from voicemailgateway send it to voicemailgateway folder
or 
if the message is more than 1MB then move it to mailbox.large
(all these are possible with sieve).

 Then the autosieve patch kicks in. You use it in order to let sieve
autocreate the folders that the messages will be sent. Voila, here 
is a solution without patching cyrus imap.

 As I understand from the problem the name of the folders is 
fixed. But even if this is not fixed you can use the anysievefolders
option and use any name you wish. The script will backup the folders
and then delete them. If a new message arrives the autosieve patch
will autocreate them.

  I think you should consider this solution prior to try patching
cyrus imap. 

   Best regards,
    Aristotelis
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list