John Dennis 38f226
Cyrus IMAP autosievefolder patch
John Dennis 38f226
----------------------------------
John Dennis 38f226
John Dennis 38f226
NOTE : This patch has been created at the University of Athens. For more info, as well 
John Dennis 38f226
as more patches on Cyrus IMAPD server, please visit http://email.uoa.gr 
John Dennis 38f226
John Dennis 38f226
John Dennis 38f226
  When the lmtpd daemon receives an email message prior to delivering it to the 
John Dennis 38f226
INBOX folder of the user, checks if the user has specified sieve filters. If the
John Dennis 38f226
user has specified sieve filters the filters are evaluated. If the message matches
John Dennis 38f226
any of the filters the action that is specified in the filter is executed. If the action 
John Dennis 38f226
is FileInto it is stored in the subfolder specified in the filter. If the 
John Dennis 38f226
subfolder doesn't exist then the message is sent to the INBOX folder of the user.
John Dennis 38f226
John Dennis 38f226
  With this patch if the folder doesn't exist AND the name of the subfolder is 
John Dennis 38f226
specified in the autosievefolders option, OR the anysievefolder is set to 
John Dennis 38f226
yes in the cyrus-imap configuration file then the subfolder is created and the mail 
John Dennis 38f226
is stored there.
John Dennis 38f226
John Dennis 38f226
John Dennis 38f226
Check the following options of the imapd.conf file
John Dennis 38f226
==================================================
John Dennis 38f226
John Dennis 38f226
* anysievefolder : It must be "yes" in order to permit the autocreation of any 
John Dennis 38f226
INBOX subfolder requested by a sieve filter, through the "fileinto" action. (default = no)
John Dennis 38f226
* autosievefolders : It is a "|" separated list of subfolders of INBOX that will be 
John Dennis 38f226
automatically created, if requested by a sieve filter, through the "fileinto" 
John Dennis 38f226
action. (default = null)
John Dennis 38f226
	i.e. autosievefolders: Junk | Spam
John Dennis 38f226
John Dennis 38f226
WARNING: anysievefolder, takes precedence over autosievefolders . Which means that if 
John Dennis 38f226
anysievefolder is set to "yes", cyrus will create any INBOX subfolder requested, no-matter what the value of autosievefolders is.
John Dennis 38f226
John Dennis 38f226
John Dennis 38f226
Things to be done
John Dennis 38f226
=================
John Dennis 38f226
John Dennis 38f226
1. Support cyrus wildcards in the autosievefolders option. 
John Dennis 38f226
John Dennis 38f226
John Dennis 38f226
For more information and updates please visit http://email.uoa.gr/projects/cyrus/autosievefolder
John Dennis 38f226