Create Mailboxes on Delivery

ms419 at freezone.co.uk ms419 at freezone.co.uk
Tue Jun 29 02:13:17 EDT 2004


On Jun 26, 2004, at 1:42 PM, Aristotelis 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.
>
> On Sat, 26 Jun 2004 ms419 at freezone.co.uk wrote:
>
>> 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.

I agree that this is a good solution using Sieve. Unfortunately, we're 
not using Sieve. Among our reasons, we call some programs from the 
recipes, and some users use MH instead of IMAP (some use both, for 
different messages).

I think patching Cyrus could even be easier (certainly less tedious) 
than converting all of our Procmail recipes to Sieve scripts - if I 
could figure out what's wrong with the call to 
"mboxlist_createmailbox".

Many thanks for the thoughtful suggestions!

Jack

---
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