rpms/cyrus-imapd/devel cyrus-imapd-2.3.7-notify_sms.patch, NONE, 1.1 cyrus-imapd-2.3.8-autocreate-0.10-0.diff, NONE, 1.1 cyrus-imapd-2.3.8-autosieve-0.6.0.diff, NONE, 1.1 cyrus-imapd-2.3.8-rmquota+deletemailbox-0.2-1.diff, NONE, 1.1 .cvsignore, 1.5, 1.6 cyrus-imapd.spec, 1.20, 1.21 sources, 1.7, 1.8 cyrus-imapd-2.2.12-notify_sms.patch, 1.1, NONE cyrus-imapd-2.3.1-autocreate-0.10-0.diff, 1.1, NONE cyrus-imapd-2.3.1-autosievefolder-0.6-0.diff, 1.1, NONE cyrus-imapd-2.3.1-rmquota+deletemailbox-0.2-1.diff, 1.1, NONE
Tomas Janousek (tjanouse)
fedora-extras-commits at redhat.com
Mon Mar 12 16:23:25 UTC 2007
Author: tjanouse
Update of /cvs/extras/rpms/cyrus-imapd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12122
Modified Files:
.cvsignore cyrus-imapd.spec sources
Added Files:
cyrus-imapd-2.3.7-notify_sms.patch
cyrus-imapd-2.3.8-autocreate-0.10-0.diff
cyrus-imapd-2.3.8-autosieve-0.6.0.diff
cyrus-imapd-2.3.8-rmquota+deletemailbox-0.2-1.diff
Removed Files:
cyrus-imapd-2.2.12-notify_sms.patch
cyrus-imapd-2.3.1-autocreate-0.10-0.diff
cyrus-imapd-2.3.1-autosievefolder-0.6-0.diff
cyrus-imapd-2.3.1-rmquota+deletemailbox-0.2-1.diff
Log Message:
* Mon Mar 12 2007 Tomas Janousek <tjanouse at redhat.com> - 2.3.8-1
- update to latest upstream
cyrus-imapd-2.3.7-notify_sms.patch:
--- NEW FILE cyrus-imapd-2.3.7-notify_sms.patch ---
diff -Naur cyrus-imapd-2.3.7.orig/doc/man/imapd.conf.5.html cyrus-imapd-2.3.7/doc/man/imapd.conf.5.html
--- cyrus-imapd-2.3.7.orig/doc/man/imapd.conf.5.html 2006-07-10 16:31:53.000000000 +0200
+++ cyrus-imapd-2.3.7/doc/man/imapd.conf.5.html 2006-07-14 10:27:29.000000000 +0200
@@ -3130,6 +3130,24 @@
<tr valign="top" align="left">
<td width="10%"></td>
<td width="89%">
+<p><b>sendsms:</b> /usr/bin/sendsms</p></td>
+</table></p>
+<!-- INDENTATION -->
+<table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="19%"></td>
+<td width="80%">
+<p>The pathname of the sendsms executable. Sieve invokes
+sendsms for sending SMS notifications.</p>
+</td>
+</table>
+<!-- INDENTATION -->
+<p><table width="100%" border=0 rules="none" frame="void"
+ cols="2" cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="89%">
<p><b>servername:</b> <none></p></td>
</table>
<!-- INDENTATION -->
diff -Naur cyrus-imapd-2.3.7.orig/doc/man/notifyd.8.html cyrus-imapd-2.3.7/doc/man/notifyd.8.html
--- cyrus-imapd-2.3.7.orig/doc/man/notifyd.8.html 2006-07-10 16:31:54.000000000 +0200
+++ cyrus-imapd-2.3.7/doc/man/notifyd.8.html 2006-07-14 10:27:29.000000000 +0200
@@ -181,6 +181,18 @@
<td width="11%"></td>
<td width="10%">
+<p><b>sms</b></p>
+</td>
+<td width="77%">
+
+<p>Send the notification as SMS. This method can ONLY be used in
+a Sieve ’notify’ action as it requires a
+<i>sms:</i> URL to be specified as an <i>:option</i>.</p>
+</td>
+<tr valign="top" align="left">
+<td width="11%"></td>
+<td width="10%">
+
<p><b>zephyr</b></p>
</td>
<td width="77%">
diff -Naur cyrus-imapd-2.3.7.orig/lib/imapoptions cyrus-imapd-2.3.7/lib/imapoptions
--- cyrus-imapd-2.3.7.orig/lib/imapoptions 2006-06-27 17:58:42.000000000 +0200
+++ cyrus-imapd-2.3.7/lib/imapoptions 2006-07-14 10:27:29.000000000 +0200
@@ -829,6 +829,10 @@
/* The pathname of the sendmail executable. Sieve invokes sendmail
for sending rejections, redirects and vacation responses. */
+{ "sendsms", "/usr/bin/sendsms", STRING }
+/* The pathname of the sendsms executable. Sieve invokes sendsms
+ for sending SMS notifications. */
+
{ "servername", NULL, STRING }
/* This is the hostname visible in the greeting messages of the POP,
IMAP and LMTP daemons. If it is unset, then the result returned
diff -Naur cyrus-imapd-2.3.7.orig/man/imapd.conf.5 cyrus-imapd-2.3.7/man/imapd.conf.5
--- cyrus-imapd-2.3.7.orig/man/imapd.conf.5 2006-07-10 16:31:52.000000000 +0200
+++ cyrus-imapd-2.3.7/man/imapd.conf.5 2006-07-14 10:27:29.000000000 +0200
@@ -691,6 +691,9 @@
.IP "\fBsendmail:\fR /usr/lib/sendmail" 5
The pathname of the sendmail executable. Sieve invokes sendmail
for sending rejections, redirects and vacation responses.
+.IP "\fBsendsms:\fR /usr/bin/sendsms" 5
+The pathname of the sendsms executable. Sieve invokes sendsms
+for sending SMS notifications.
.IP "\fBservername:\fR <none>" 5
This is the hostname visible in the greeting messages of the POP,
IMAP and LMTP daemons. If it is unset, then the result returned
diff -Naur cyrus-imapd-2.3.7.orig/man/notifyd.8 cyrus-imapd-2.3.7/man/notifyd.8
--- cyrus-imapd-2.3.7.orig/man/notifyd.8 2003-08-10 01:43:14.000000000 +0200
+++ cyrus-imapd-2.3.7/man/notifyd.8 2006-07-14 10:27:29.000000000 +0200
@@ -110,6 +110,11 @@
Sieve 'notify' action as it requires a \fImailto:\fR URL to be
specified as an \fI:option\fR.
.TP
+.B sms
+Send the notification as SMS. This method can ONLY be used in a
+Sieve 'notify' action as it requires a \fIsms:\fR URL to be
+specified as an \fI:option\fR.
+.TP
.B zephyr
Send the notification as a zephyrgram. If used in a Sieve 'notify'
action, additional recipients can be specified as \fI:options\fR.
diff -Naur cyrus-imapd-2.3.7.orig/notifyd/Makefile.in cyrus-imapd-2.3.7/notifyd/Makefile.in
--- cyrus-imapd-2.3.7.orig/notifyd/Makefile.in 2004-05-31 20:22:59.000000000 +0200
+++ cyrus-imapd-2.3.7/notifyd/Makefile.in 2006-07-14 10:27:29.000000000 +0200
@@ -82,7 +82,7 @@
install:
$(INSTALL) -m 755 notifyd $(DESTDIR)$(service_path)
-OBJS= notifyd.o notify_null.o notify_log.o notify_mailto.o notify_zephyr.o
+OBJS= notifyd.o notify_null.o notify_log.o notify_mailto.o notify_sms.o notify_zephyr.o
notifytest: notifytest.o
$(CC) $(LDFLAGS) -o notifytest \
diff -Naur cyrus-imapd-2.3.7.orig/notifyd/notifyd.h cyrus-imapd-2.3.7/notifyd/notifyd.h
--- cyrus-imapd-2.3.7.orig/notifyd/notifyd.h 2003-02-13 21:15:48.000000000 +0100
+++ cyrus-imapd-2.3.7/notifyd/notifyd.h 2006-07-14 10:27:29.000000000 +0200
@@ -48,6 +48,7 @@
#include "notify_null.h"
#include "notify_log.h"
#include "notify_mailto.h"
+#include "notify_sms.h"
#include "notify_zephyr.h"
/* Notify method dispatch table definition */
@@ -64,6 +65,7 @@
{ "null", notify_null }, /* do nothing */
{ "log", notify_log }, /* use syslog (for testing) */
{ "mailto", notify_mailto }, /* send an email */
+ { "sms", notify_sms }, /* send an sms */
#ifdef HAVE_ZEPHYR
{ "zephyr", notify_zephyr }, /* send a zephyrgram */
#endif
diff -Naur cyrus-imapd-2.3.7.orig/notifyd/notify_sms.c cyrus-imapd-2.3.7/notifyd/notify_sms.c
--- cyrus-imapd-2.3.7.orig/notifyd/notify_sms.c 1970-01-01 01:00:00.000000000 +0100
+++ cyrus-imapd-2.3.7/notifyd/notify_sms.c 2006-07-14 10:29:10.000000000 +0200
@@ -0,0 +1,116 @@
+/* notify_sms.c -- SMS notification method
+ * Simon Matter
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * notify_sms is based on code from notify_mailto by Ken Murchison.
+ * Copyright (c) 2005-2006 Simon Matter, Invoca Systems.
+ * Release 2006071300/2.3.7
+*/
+
+#include <config.h>
+
+#include "notify_sms.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "global.h"
+#include "libconfig.h"
+#include "sieve_interface.h"
+
+static int global_outgoing_count = 0;
+
+char* notify_sms(const char *class __attribute__((unused)),
+ const char *priority,
+ const char *user,
+ const char *mailbox __attribute__((unused)),
+ int nopt, char **options,
+ const char *message)
+{
+ FILE *sm;
+ const char *smbuf[10];
+ int sm_stat;
+ pid_t sm_pid;
+ int fds[2];
+
+ /* XXX check/parse options (sms URI) */
+ if (nopt < 1)
+ return strdup("NO sms URI not specified");
+
+ smbuf[0] = "sendsms";
+ smbuf[1] = "-u";
+ smbuf[2] = user;
+ smbuf[3] = "-p";
+ smbuf[4] = priority;
+ smbuf[5] = "-o";
+ smbuf[6] = options[0];
+ smbuf[7] = NULL;
+
+ pipe(fds);
+ if ((sm_pid = fork()) == 0) {
+ /* i'm the child! run sendsms! */
+ close(fds[1]);
+ /* make the pipe be stdin */
+ dup2(fds[0], 0);
+ execv(config_getstring(IMAPOPT_SENDSMS), (char **) smbuf);
+
+ /* if we're here we suck */
+ return strdup("NO sms couldn't exec");
+ }
+ /* i'm the parent */
+ close(fds[0]);
+ sm = fdopen(fds[1], "w");
+
+ if (!sm)
+ return strdup("NO sms could not spawn sendsms process");
+
+ fprintf(sm, message);
+
+ fclose(sm);
+ while (waitpid(sm_pid, &sm_stat, 0) < 0);
+
+ /* XXX check for sendsms exit code */
+
+ return strdup("OK sms notification successful");
+}
diff -Naur cyrus-imapd-2.3.7.orig/notifyd/notify_sms.h cyrus-imapd-2.3.7/notifyd/notify_sms.h
--- cyrus-imapd-2.3.7.orig/notifyd/notify_sms.h 1970-01-01 01:00:00.000000000 +0100
+++ cyrus-imapd-2.3.7/notifyd/notify_sms.h 2006-07-14 10:29:10.000000000 +0200
@@ -0,0 +1,61 @@
+/* notify_sms.h -- SMS notification method
+ * Simon Matter
+ */
+/*
+ * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer at andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+ * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * notify_sms is based on code from notify_mailto by Ken Murchison.
+ * Copyright (c) 2005-2006 Simon Matter, Invoca Systems.
+ * Release 2006071300/2.3.7
+ *
+ */
+
+#ifndef _NOTIFY_SMS_H_
+#define _NOTIFY_SMS_H_
+
+#include <config.h>
+
+char* notify_sms(const char *class __attribute__((unused)),
+ const char *priority,
+ const char *user,
+ const char *mailbox __attribute__((unused)),
+ int nopt, char **options,
+ const char *message);
+
+#endif /* _NOTIFY_SMS_H_ */
cyrus-imapd-2.3.8-autocreate-0.10-0.diff:
--- NEW FILE cyrus-imapd-2.3.8-autocreate-0.10-0.diff ---
diff -Naur cyrus-imapd-2.3.8/README.autocreate cyrus-imapd-2.3.8-autocreate.uncompiled/README.autocreate
--- cyrus-imapd-2.3.8/README.autocreate 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/README.autocreate 2007-02-13 14:05:07.000000000 +0200
@@ -0,0 +1,211 @@
+Cyrus IMAP autocreate Inbox patch
+----------------------------------
+
+NOTE : This patch has been created at the University of Athens. For more info, as well
+as more patches on Cyrus IMAPD server, please visit http://email.uoa.gr/
+
+The design of Cyrus IMAP server does not predict the automatic creation of users'
+INBOX folders. The creation of a user's INBOX is considered to be an external task,
+that has to be completed as part of the user email account creation procedure.
+Hence, to create a new email account the site administrator has to:
+
+ a) Include the new account in the user database for the authentication procedure
+ (e.g. sasldb, shadow, mysql, ldap).
+ b) Create the corresponding INBOX folder.
+
+Alternatively, the user, if succesfully authenticated, may create his own INBOX folder,
+as long as the configuration of the site allows it (see "autocreatequota" in imapd.conf).
+Unlike what not careful readers may think, enabling the "autocreatequota" option, doesn't
+lead to the automatic INBOX folder creation by Cyrus IMAP server.
+In fact, "autocreate" means that the IMAP clients are allowed to automatically create
+the user INBOX.
+
+This patch adds the functionality of automatic creation of the users' INBOX folders into
+the Cyrus IMAP server. It is implemented as two features, namely the "create on login"
+and "create on post".
+
+
+
+Create on login
+===============
+This feauture provides automatic creation of a user's INBOX folder when all of the
+following requirements are met:
+
+i) The user has succesfully passed the authentication procedure.
+
+ii) The user's authorisation ID (typically the same as the user's
+authentication ID) doesn't belong to the imap_admins or admins
+accounts (see imapd.conf).
+
+iii) The "autocreatequota" option in the imap configuration file
+has been set to a non zero value.
+
+iv) The corresponding to the user's authorisation ID INBOX folder
+does not exist.
+
+The user's first login is the most typical case when all four requirements are met.
+Note that if the authenticated ID is allowed to proxy to another account for which
+all of the above requirements are met, the corresponding INBOX folder for that account
+will be created.
+
+
+
+Create on post
+==============
+This feauture provides automatic creation of a user's INBOX folder when all of the
+following requirements are met.
+
+i) An email message addressed to the user has been received.
+
+ii) The recipient is not any of the imap_admins or admins accounts.
+Note that passing emails to admins or imap_admins accounts from
+the MTA to LMTP should be avoided in any case.
+
+iii) The recipient's INBOX does not exist.
+
+iv) The "autocreatequota" option in the imap configuration file
+has been set to a non zero value.
+
+v) The "createonpost" option in the imap configuration file
+has been switched on.
+
+
+Besides the automatic creation of INBOX folder, additional functionalities are
+provided:
+
+ (A) Automatic creation of INBOX subfolders controlled by "autocreateinboxfolders"
+configuration option. eg
+
+autocreateinboxfolders: sent|drafts|spam|templates
+
+ (B) Automatic subscription of INBOX subfolders controlled by "autosubscribeinboxfolders"
+configuration option. eg
+
+autosubscribeinboxfolders: sent|spam
+
+Obviously, only subscription to subfolders included in the "autocreateinboxfolder"
+list is meaningful.
+
+ (C) Automatic subscription to shared folders (bulletin boards). The user gets
+automatically subscribed to the shared folders declared in the "autosubscribesharedfolders"
+configuration option in imapd.conf.
+eg autosubscribesharedfolders: public_folder | public_folder.subfolder
+
+In order the above action to succeed, the shared folder has to pre-exist the INBOX creation
+and the user must have the appropriate permissions in order to be able to subscribe to the
+shared folder.
+
+* A new config option has been added. 'autosubscribe_all_sharedfolders' is a yes/no
+option. When set to yes, the user is automatically subscribed to all shared folders one
+has permission to subscribe to. Please, note that when this option is set to yes, then
+'autosubscribesharedfolders' option is overriden.
+
+ (D) Automatic creation of a predefined default sieve script.
+
+This is very useful when a default sieve script is used for every user. Usually, a
+default anti-spam script may me be written in a file and copied to each user
+sieve scripts upon the INBOX creation. The imapd.conf options that have been added
+are 'autocreate_sieve_script', 'autocreate_sieve_compiledscript' and
+'generate_compiled_sieve_script'.
+
+autocreate_sieve_script configuration option refers to the full path of the file
+that contains the sieve script. The default value is null and if no file is defined,
+then no default script is created upon INBOX creation. (The feature is disabled)
+eg autocreate_sieve_script: /etc/default_sieve_script
+
+autocreate_sieve_compiledscript configuration option refers to the full path of the
+file that contains the bytecode compiled sieve script. If this filename is defined
+in imapd.conf and the file exists, then it is automatically copied in the user's sieve
+directory. If it is not defined, then a bytecode sieve script gets on the fly compiled
+by the daemon.
+eg autocreate_sieve_compiledscript: /etc/default_sieve_script.bc
+
+generate_compiled_sieve_script is a boolean option that triggers the compilation of the
+source sieve script to bytecode sieve script. The file that the bytecode script will
+be saved is pointed by autocreate_sieve_compiledscript.
+
+Ways of compiling a sieve script :
+1. Compile a sieve script using the standard sievec utility, distributed by CMU
+2. Compile a sieve script using the compile_sieve utility, released by UoA. This
+ tool is almost identical to the sievec utility, with the difference that it
+ reads the input and output file from autocreate_sieve_script and
+ autocreate_sieve_compiledscript options in imapd.conf
+3. Let cyrus create a compiled sieve script using a source script. Cyrus can be
+ instructed to save the compiled script any time a compiled script does not exist.
+
+NOTES :
+1. In order this functionality to work, the following requirements must have been met:
+ - 'sieveusehomedir' option must be 'no' in the configuration (default).
+ - 'sievedir' option must have a valid value.
+2. Currently, this patch checks the validity of the source script while generating a
+ bytecode compiled script, but not the validity of the bytecode sieve script file.
+ The administrator should make sure that the provided files contain a valid sieve
+ script as well as the compiled script is updated every time the source script changes.
+
+
+ (E) The administrator may control for which users and/or groups may the INBOXes
+automatically be created. The autocreate_users option restricts the groups
+for which the patch will create the mailboxes.
+
+The default value of autocreate_users is anyone. So, if not set at all, the patch will
+work for all users. However, one may set:
+
+autocreate_users: user1 user2 group:group1 group:group2
+
+In that case, the INBOX will be created only for user1, user2 and the users that belong
+to group1 and group2.
+
+More refined control per service is provided by the options imap_autocreate_users,
+pop3_autocreate_users and lmtp_autocreate_users. These options override the
+autocreate_users option and offer per service control.
+
+Example:
+One may want to restrict the create on post functionality only for a specific group
+of users. To achieve this, the following lines must be added in the imapd.conf file:
+
+createonpost: yes
+lmtp_autocreate_users: group:groupname
+
+
+
+Issues to be considered
+=======================
+
+I) In order to use the create on post feauture one should be absolutely sure that:
+a) The MTA checks the validity of the email recipient before sending the email to
+LMTP. This is an RFC821 requirement. This usually expands to "the mta should be
+able to use the account database as user mailbox database".
+b) Only authorised accounts/services can talk to LMTP.
+
+II) Especially in the case of imap logins, the current patch implementation checks
+for the INBOX folder existence upon login, causing an extra mailbox lookup in most
+of the cases.
+A better approach would be to chase the "IMAP_MAILBOX_NONEXISTENT" error code and
+check if the error is associated with an INBOX folder. However, this would mess up
+Cyrus code. The way it was implemented may not have been the most performance
+optimised, but it produces a much cleaner and simple patch.
+
+
+
+Virtual Domains Support
+=======================
+
+Virtual domains are supported by all versions of the patch for cyrus-imapd-2.2.1-BETA and
+later. However, it is not possible to declare different INBOX subfolders to be created or
+shared folders to be subscribed to for every domain.
[...1975 lines suppressed...]
+
#endif
struct auth_mech auth_krb =
@@ -376,4 +392,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.8/lib/auth_krb5.c cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_krb5.c
--- cyrus-imapd-2.3.8/lib/auth_krb5.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_krb5.c 2007-02-13 14:05:07.000000000 +0200
@@ -197,6 +197,14 @@
free(auth_state);
}
+static char *mycanonuser(struct auth_state *auth_state)
+{
+ if (auth_state)
+ return auth_state->userid;
+
+ return NULL;
+}
+
#else /* HAVE_GSSAPI_H */
static int mymemberof(
@@ -225,6 +233,12 @@
fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
}
+static char *mycanonuser(
+ struct auth_state *auth_state __attribute__((unused)))
+{
+ fatal("Authentication mechanism (krb5) not compiled in", EC_CONFIG);
+}
+
#endif
struct auth_mech auth_krb5 =
@@ -235,4 +249,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.8/lib/auth_pts.c cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_pts.c
--- cyrus-imapd-2.3.8/lib/auth_pts.c 2007-02-05 20:43:26.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_pts.c 2007-02-13 14:05:07.000000000 +0200
@@ -511,6 +511,14 @@
free(auth_state);
}
+static char *mycanonuser(struct auth_state *auth_state)
+{
+ if (auth_state)
+ return auth_state->userid.id;
+
+ return NULL;
+}
+
struct auth_mech auth_pts =
{
"pts", /* name */
@@ -519,4 +527,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.8/lib/auth_unix.c cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_unix.c
--- cyrus-imapd-2.3.8/lib/auth_unix.c 2006-11-30 19:11:22.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/lib/auth_unix.c 2007-02-13 14:05:07.000000000 +0200
@@ -264,6 +264,16 @@
free((char *)auth_state);
}
+static char *mycanonuser(auth_state)
+ struct auth_state *auth_state;
+{
+ if (auth_state)
+ return auth_state->userid;
+
+ return NULL;
+}
+
+
struct auth_mech auth_unix =
{
@@ -273,4 +283,5 @@
&mymemberof,
&mynewstate,
&myfreestate,
+ &mycanonuser,
};
diff -Naur cyrus-imapd-2.3.8/lib/imapoptions cyrus-imapd-2.3.8-autocreate.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.8/lib/imapoptions 2007-02-07 20:58:07.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/lib/imapoptions 2007-02-13 14:05:07.000000000 +0200
@@ -177,6 +177,55 @@
/* Number of seconds to wait before returning a timeout failure when
performing a client connection (e.g. in a murder environment) */
+{ "createonpost", 0, SWITCH }
+/* If yes, when lmtpd receives an incoming mail for an INBOX that does not exist,
+ then the INBOX is automatically created by lmtpd. */
+
+{ "autocreateinboxfolders", NULL, STRING }
+/* If a user does not have an INBOX created then the INBOX as well as some INBOX
+ subfolders are created under two conditions.
+ 1. The user logins via the IMAP or the POP3 protocol. (autocreatequota option must have a nonzero value)
+ 2. A message arrives for the user through the LMTPD protocol.(createonpost option must be yes)
+ autocreateinboxfolders is a list of INBOX's subfolders separated by a "|", that
+ are automatically created by the server under the previous two situations. */
+
+{ "autosubscribeinboxfolders", NULL, STRING }
+/* A list of folder names, separated by "|", that the users get automatically subscribed to,
+ when their INBOX is created. These folder names must have been included in the
+ autocreateinboxfolders option of the imapd.conf. */
+
+{ "autosubscribesharedfolders", NULL, STRING }
+/* A list of shared folders (bulletin boards), separated by "|", that the users get
+ automatically subscribed to, after their INBOX is created. The shared folder must
+ have been created and the user must have the required permissions to get subscribed
+ to it. Otherwise, subscribing to the shared folder fails. */
+
+{ "autosubscribe_all_sharedfolders", 0, SWITCH }
+/* If set to yes, the user is automatically subscribed to all shared folders, one has permission
+ to subscribe to. */
+
+{ "autocreate_sieve_script", NULL, STRING }
+/* The full path of a file that contains a sieve script. This script automatically becomes a
+ user's initial default sieve filter script. When this option is not defined, no default
+ sieve filter is created. The file must be readable by the cyrus daemon. */
+
+{ "autocreate_sieve_compiledscript", NULL, STRING }
+/* The full path of a file that contains a compiled in bytecode sieve script. This script
+ automatically becomes a user's initial default sieve filter script. If this option is
+ not specified, or the filename doesn't exist then the script defined by
+ autocreate_sieve_script is compiled on the fly and installed as the user's default
+ sieve script */
+
+{ "generate_compiled_sieve_script", 0, SWITCH }
+/* If set to yes and no compiled sieve script file exists, the sieve script which is
+ compiled on the fly will be saved in the file name that autocreate_sieve_compiledscript
+ option points to. In order a compiled script to be generated, autocreate_sieve_script and
+ autocreate_sieve_compiledscript must have valid values */
+
+{ "autocreate_users", "anyone", STRING }
+/* A space separated list of users and/or groups that are allowed their INBOX to be
+ automatically created. */
+
{ "configdirectory", NULL, STRING }
/* The pathname of the IMAP configuration directory. This field is
required. */
diff -Naur cyrus-imapd-2.3.8/notifyd/Makefile.in cyrus-imapd-2.3.8-autocreate.uncompiled/notifyd/Makefile.in
--- cyrus-imapd-2.3.8/notifyd/Makefile.in 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/notifyd/Makefile.in 2007-02-13 14:05:07.000000000 +0200
@@ -69,10 +69,11 @@
SERVICE=../master/service.o
IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+SIEVE_LIBS = @SIEVE_LIBS@
IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
LIB_WRAP = @LIB_WRAP@
LIBS = @ZEPHYR_LIBS@ @LIBS@ $(IMAP_COM_ERR_LIBS)
-DEPLIBS=../imap/mutex_fake.o ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+DEPLIBS=../imap/mutex_fake.o ../imap/libimap.a $(SIEVE_LIBS) ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
PURIFY=/usr/local/bin/purify
PUREOPT=-best-effort
diff -Naur cyrus-imapd-2.3.8/notifyd/notifyd.c cyrus-imapd-2.3.8-autocreate.uncompiled/notifyd/notifyd.c
--- cyrus-imapd-2.3.8/notifyd/notifyd.c 2006-11-30 19:11:23.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/notifyd/notifyd.c 2007-02-13 14:05:07.000000000 +0200
@@ -97,7 +97,7 @@
#define NOTIFY_MAXSIZE 8192
-int do_notify()
+static int do_notify()
{
struct sockaddr_un sun_data;
socklen_t sunlen = sizeof(sun_data);
diff -Naur cyrus-imapd-2.3.8/ptclient/Makefile.in cyrus-imapd-2.3.8-autocreate.uncompiled/ptclient/Makefile.in
--- cyrus-imapd-2.3.8/ptclient/Makefile.in 2006-11-30 19:11:24.000000000 +0200
+++ cyrus-imapd-2.3.8-autocreate.uncompiled/ptclient/Makefile.in 2007-02-13 14:05:07.000000000 +0200
@@ -57,10 +57,11 @@
AFS_LDFLAGS = @AFS_LDFLAGS@ @COM_ERR_LDFLAGS@
AFS_LIBS = @AFS_LIBS@
IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@
+SIEVE_LIBS = @SIEVE_LIBS@
LIBS = $(IMAP_LIBS) @COM_ERR_LIBS@
LIB_SASL = @LIB_SASL@
LIB_WRAP = @LIB_WRAP@
-DEPLIBS = ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+DEPLIBS = ../imap/libimap.a $(SIEVE_LIBS) ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
UTIL_LIBS = ../imap/mutex_fake.o ../imap/cli_fatal.o
LDAP_LIBS=@LDAP_LIBS@
cyrus-imapd-2.3.8-autosieve-0.6.0.diff:
--- NEW FILE cyrus-imapd-2.3.8-autosieve-0.6.0.diff ---
diff -Naur cyrus-imapd-2.3.8/README.autosievefolder cyrus-imapd-2.3.8-autosieve.uncompiled/README.autosievefolder
--- cyrus-imapd-2.3.8/README.autosievefolder 1970-01-01 02:00:00.000000000 +0200
+++ cyrus-imapd-2.3.8-autosieve.uncompiled/README.autosievefolder 2007-02-13 15:05:04.000000000 +0200
@@ -0,0 +1,42 @@
+Cyrus IMAP autosievefolder patch
+----------------------------------
+
+NOTE : This patch has been created at the University of Athens. For more info, as well
+as more patches on Cyrus IMAPD server, please visit http://email.uoa.gr
+
+
+ When the lmtpd daemon receives an email message prior to delivering it to the
+INBOX folder of the user, checks if the user has specified sieve filters. If the
+user has specified sieve filters the filters are evaluated. If the message matches
+any of the filters the action that is specified in the filter is executed. If the action
+is FileInto it is stored in the subfolder specified in the filter. If the
+subfolder doesn't exist then the message is sent to the INBOX folder of the user.
+
+ With this patch if the folder doesn't exist AND the name of the subfolder is
+specified in the autosievefolders option, OR the anysievefolder is set to
+yes in the cyrus-imap configuration file then the subfolder is created and the mail
+is stored there.
+
+
+Check the following options of the imapd.conf file
+==================================================
+
+* anysievefolder : It must be "yes" in order to permit the autocreation of any
+INBOX subfolder requested by a sieve filter, through the "fileinto" action. (default = no)
+* autosievefolders : It is a "|" separated list of subfolders of INBOX that will be
+automatically created, if requested by a sieve filter, through the "fileinto"
+action. (default = null)
+ i.e. autosievefolders: Junk | Spam
+
+WARNING: anysievefolder, takes precedence over autosievefolders . Which means that if
+anysievefolder is set to "yes", cyrus will create any INBOX subfolder requested, no-matter what the value of autosievefolders is.
+
+
+Things to be done
+=================
+
+1. Support cyrus wildcards in the autosievefolders option.
+
+
+For more information and updates please visit http://email.uoa.gr/projects/cyrus/autosievefolder
+
diff -Naur cyrus-imapd-2.3.8/imap/lmtp_sieve.c cyrus-imapd-2.3.8-autosieve.uncompiled/imap/lmtp_sieve.c
--- cyrus-imapd-2.3.8/imap/lmtp_sieve.c 2007-02-05 20:41:47.000000000 +0200
+++ cyrus-imapd-2.3.8-autosieve.uncompiled/imap/lmtp_sieve.c 2007-02-13 15:05:04.000000000 +0200
@@ -88,6 +88,9 @@
struct auth_state *authstate;
} script_data_t;
+static int autosieve_subfolder(char *userid, struct auth_state *auth_state,
+ char *subfolder, struct namespace *namespace);
+
static char *make_sieve_db(const char *user)
{
static char buf[MAX_MAILBOX_PATH+1];
@@ -484,7 +487,20 @@
sd->username, mdata->notifyheader,
namebuf, quotaoverride, 0);
}
-
+
+ if (ret == IMAP_MAILBOX_NONEXISTENT) {
+ /* if "plus" folder under INBOX, then try to create it */
+ ret = autosieve_subfolder((char *) sd->username, sd->authstate, namebuf, mdata->namespace);
+
+ /* Try to deliver the mail again. */
+ if (!ret)
+ ret = deliver_mailbox(md->f, mdata->content, mdata->stage, md->size,
+ fc->imapflags->flag, fc->imapflags->nflags,
+ (char *) sd->username, sd->authstate, md->id,
+ sd->username, mdata->notifyheader,
+ namebuf, quotaoverride, 0);
+ }
+
if (!ret) {
snmp_increment(SIEVE_FILEINTO, 1);
return SIEVE_OK;
@@ -936,3 +952,80 @@
we'll do normal delivery */
return r;
}
+
+
+#define SEP '|'
+
+static int autosieve_subfolder(char *userid, struct auth_state *auth_state,
+ char *subfolder, struct namespace *namespace)
+{
+ char option_name_external[MAX_MAILBOX_NAME + 1];
+ char option_name_internal[MAX_MAILBOX_NAME + 1];
+ const char *subf ;
+ char *p, *q, *next_subf;
+ int len, r = 0;
+ int createsievefolder = 0;
+
+ /* Check if subfolder or userid are NULL */
+ if(userid == NULL || subfolder == NULL)
+ return IMAP_MAILBOX_NONEXISTENT;
+
+ syslog(LOG_DEBUG, "autosievefolder: autosieve_subfolder() was called for user %s, folder %s",
+ userid, subfolder);
+
+ if (config_getswitch(IMAPOPT_ANYSIEVEFOLDER)) {
+ createsievefolder = 1;
+ } else if ((subf = config_getstring(IMAPOPT_AUTOSIEVEFOLDERS)) != NULL) {
+ /* Roll through subf */
+ next_subf = (char *) subf;
+ while (*next_subf) {
+ for (p = next_subf ; isspace((int) *p) || *p == SEP ; p++);
+ for (next_subf = p ; *next_subf && *next_subf != SEP ; next_subf++);
+ for (q = next_subf ; q > p && (isspace((int) *q) || *q == SEP || !*q); q--);
+
+ if (!*p) continue;
+
+ len = q - p + 1;
+ /*
+ * This is a preliminary length check based on the assumption
+ * that the *final* internal format will be something
+ * like user.userid.subfolder(s).
+ */
+ if (len > sizeof(option_name_external) - strlen(userid) - 5)
+ return IMAP_MAILBOX_BADNAME;
+
+ strlcpy(option_name_external, namespace->prefix[NAMESPACE_INBOX], sizeof(option_name_external));
+ strncat(option_name_external, p, len);
+
+ /*
+ * Transform the option folder name to internal namespace and compare it
+ * with what must be created.
+ */
+ r = namespace->mboxname_tointernal(namespace, option_name_external, userid, option_name_internal);
+ if (r) continue;
+
+ if (!strcmp(option_name_internal, subfolder)) {
+ createsievefolder = 1;
+ break;
+ }
+ }
+ }
+
+ if (createsievefolder) {
+ /* Folder is already in internal namespace format */
+ r = mboxlist_createmailbox(subfolder, MAILBOX_FORMAT_NORMAL, NULL,
+ 1, userid, auth_state, 0, 0, 0);
+ if (!r) {
+ mboxlist_changesub(subfolder, userid, auth_state, 1, 1);
+ syslog(LOG_DEBUG, "autosievefolder: User %s, folder %s creation succeeded",
+ userid, subfolder);
+ return 0;
+ } else {
+ syslog(LOG_ERR, "autosievefolder: User %s, folder %s creation failed. %s",
+ userid, subfolder,error_message(r));
+ return r;
+ }
+ } else
+ return IMAP_MAILBOX_NONEXISTENT;
+}
+
diff -Naur cyrus-imapd-2.3.8/lib/imapoptions cyrus-imapd-2.3.8-autosieve.uncompiled/lib/imapoptions
--- cyrus-imapd-2.3.8/lib/imapoptions 2007-02-07 20:58:07.000000000 +0200
+++ cyrus-imapd-2.3.8-autosieve.uncompiled/lib/imapoptions 2007-02-13 15:05:04.000000000 +0200
@@ -884,6 +884,15 @@
/* If enabled, lmtpd will look for Sieve scripts in user's home
directories: ~user/.sieve. */
+{ "anysievefolder", 0, SWITCH }
+/* It must be "yes" in order to permit the autocreation of any INBOX subfolder
+ requested by a sieve filter, through the "fileinto" action. (default = no) */
+
+{ "autosievefolders", NULL, STRING }
+/* It is a "|" separated list of subfolders of INBOX that will be automatically created,
+ if requested by a sieve filter, through the "fileinto" action. (default = null)
+ i.e. autosievefolders: Junk | Spam */
+
{ "singleinstancestore", 1, SWITCH }
/* If enabled, imapd, lmtpd and nntpd attempt to only write one copy
of a message per partition and create hard links, resulting in a
cyrus-imapd-2.3.8-rmquota+deletemailbox-0.2-1.diff:
--- NEW FILE cyrus-imapd-2.3.8-rmquota+deletemailbox-0.2-1.diff ---
diff -Naur cyrus-imapd-2.3.8/imap/ctl_cyrusdb.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/ctl_cyrusdb.c
--- cyrus-imapd-2.3.8/imap/ctl_cyrusdb.c 2006-11-30 19:11:17.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/ctl_cyrusdb.c 2007-02-21 16:34:33.000000000 +0200
@@ -133,7 +133,7 @@
/* if it is MBTYPE_RESERVED, unset it & call mboxlist_delete */
if(!r && (mbtype & MBTYPE_RESERVE)) {
if(!r) {
- r = mboxlist_deletemailbox(name, 1, NULL, NULL, 0, 0, 1);
+ r = mboxlist_deletemailbox(name, 1, NULL, NULL, 0, 0, 1, 1);
if(r) {
/* log the error */
syslog(LOG_ERR,
diff -Naur cyrus-imapd-2.3.8/imap/ctl_mboxlist.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/ctl_mboxlist.c
--- cyrus-imapd-2.3.8/imap/ctl_mboxlist.c 2007-02-05 20:41:46.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/ctl_mboxlist.c 2007-02-21 16:34:48.000000000 +0200
@@ -461,7 +461,7 @@
wipe_head = wipe_head->next;
- ret = mboxlist_deletemailbox(me->mailbox, 1, "", NULL, 0, 1, 1);
+ ret = mboxlist_deletemailbox(me->mailbox, 1, "", NULL, 0, 1, 1, 1);
if(!ret) sync_log_mailbox(me->mailbox);
if(ret) {
fprintf(stderr, "couldn't delete defunct mailbox %s\n",
diff -Naur cyrus-imapd-2.3.8/imap/imapd.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/imapd.c
--- cyrus-imapd-2.3.8/imap/imapd.c 2007-02-05 20:49:55.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/imapd.c 2007-02-21 16:34:58.000000000 +0200
@@ -4983,7 +4983,7 @@
r = mboxlist_deletemailbox(name, imapd_userisadmin,
imapd_userid, imapd_authstate,
- 0, 0, 0);
+ 0, 0, 0, 1);
if (!r) sync_log_mailbox(name);
@@ -5007,6 +5007,12 @@
char *p;
int domainlen = 0;
int sync_lockfd = (-1);
+ int keepQuota = 1;
+
+ if(name && *name == '+') {
+ keepQuota = 0;
+ name++;
+ }
r = (*imapd_namespace.mboxname_tointernal)(&imapd_namespace, name,
imapd_userid, mailboxname);
@@ -5065,7 +5071,7 @@
r = mboxlist_deletemailbox(mailboxname, imapd_userisadmin,
imapd_userid, imapd_authstate, 1-force,
- localonly, 0);
+ localonly, 0, keepQuota);
}
/* was it a top-level user mailbox? */
@@ -6423,6 +6429,7 @@
{
int newquota = -1;
int badresource = 0;
+ int rmquota = 0;
int c;
int force = 0;
static struct buf arg;
@@ -6439,7 +6446,8 @@
if (c != ')' || arg.s[0] != '\0') {
for (;;) {
if (c != ' ') goto badlist;
- if (strcasecmp(arg.s, "storage") != 0) badresource = 1;
+ if (strcasecmp(arg.s, "remove") == 0) rmquota = 1;
+ else if (strcasecmp(arg.s, "storage") != 0) badresource = 1;
c = getword(imapd_in, &arg);
if (c != ' ' && c != ')') goto badlist;
if (arg.s[0] == '\0') goto badlist;
@@ -6508,7 +6516,10 @@
/* local mailbox */
if (!r || (r == IMAP_MAILBOX_NONEXISTENT)) {
- r = mboxlist_setquota(mailboxname, newquota, force);
+ if(!rmquota)
+ r = mboxlist_setquota(mailboxname, newquota, force);
+ else
+ r = mboxlist_unsetquota(mailboxname);
}
imapd_check(NULL, 0, 0);
@@ -8221,7 +8232,7 @@
/* note also that we need to remember to let proxyadmins do this */
r = mboxlist_deletemailbox(mailboxname,
imapd_userisadmin || imapd_userisproxyadmin,
- imapd_userid, imapd_authstate, 0, 1, 0);
+ imapd_userid, imapd_authstate, 0, 1, 0, 1);
if(r) syslog(LOG_ERR,
"Could not delete local mailbox during move of %s",
mailboxname);
diff -Naur cyrus-imapd-2.3.8/imap/mailbox.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mailbox.c
--- cyrus-imapd-2.3.8/imap/mailbox.c 2007-02-05 20:41:47.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mailbox.c 2007-02-21 16:35:10.000000000 +0200
@@ -2745,27 +2745,7 @@
seen_delete_mailbox(mailbox);
- if (delete_quota_root && !rquota) {
- quota_delete(&mailbox->quota, &tid);
- free(mailbox->quota.root);
- mailbox->quota.root = NULL;
- } else if (!rquota) {
- /* Free any quota being used by this mailbox */
- if (mailbox->quota.used >= mailbox->quota_mailbox_used) {
- mailbox->quota.used -= mailbox->quota_mailbox_used;
- }
- else {
- mailbox->quota.used = 0;
- }
- r = quota_write(&mailbox->quota, &tid);
- if (r) {
- syslog(LOG_ERR,
- "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
- mailbox->quota_mailbox_used, mailbox->quota.root);
- }
- else
- quota_commit(&tid);
- }
+ mailbox_updatequota(mailbox,NULL);
/* Flush data (message file) directory */
mailbox_delete_files(mailbox->path);
@@ -3392,3 +3372,48 @@
if (*p == '.') *p = '/';
}
}
+
+/* This function is used to update the quota. Can be used to replace
+ * identical parts of the code, and can be quite handy some times
+ * The tid is used in order to make possible to make the quota update
+ * being a part of a bigger transaction to the quota db */
+int mailbox_updatequota(struct mailbox *mailbox, struct txn **tid)
+{
+ int r = 0, havetid = 0;
+ struct txn **ltid = NULL;
+
+ if(tid) {
+ ltid = tid;
+ havetid = 1;
+ }
+ /* Ensure that we are locked */
+ if(!mailbox->header_lock_count) return IMAP_INTERNAL;
+
+
+ if(mailbox->quota.root) {
+ r = quota_read(&mailbox->quota, ltid, 1);
+ if( r == 0 ) {
+ if (mailbox->quota.used >= mailbox->quota_mailbox_used) {
+ mailbox->quota.used -= mailbox->quota_mailbox_used;
+ }
+ else {
+ mailbox->quota.used = 0;
+ }
+ r = quota_write(&mailbox->quota, ltid);
+ if (r) {
+ syslog(LOG_ERR,
+ "LOSTQUOTA: unable to record free of %lu bytes in quota %s",
+ mailbox->quota_mailbox_used, mailbox->quota.root);
+ }
+ else if(!havetid)
+ quota_commit(tid);
+ }
+ /* It is not a big mistake not to have quota .. just remove from the mailbox */
+ else if ( r == IMAP_QUOTAROOT_NONEXISTENT) {
+ free(mailbox->quota.root);
+ r = 0;
+ }
+ }
+ return r;
+}
+
diff -Naur cyrus-imapd-2.3.8/imap/mailbox.h cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mailbox.h
--- cyrus-imapd-2.3.8/imap/mailbox.h 2006-11-30 19:11:19.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mailbox.h 2007-02-21 16:35:20.000000000 +0200
@@ -364,6 +364,8 @@
struct mailbox *mailboxp);
extern int mailbox_delete(struct mailbox *mailbox, int delete_quota_root);
+extern int mailbox_updatequota(struct mailbox *mailbox, struct txn **tid);
+
extern int mailbox_rename_copy(struct mailbox *oldmailbox,
const char *newname, char *newpartition,
bit32 *olduidvalidityp, bit32 *newuidvalidityp,
diff -Naur cyrus-imapd-2.3.8/imap/mboxlist.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mboxlist.c
--- cyrus-imapd-2.3.8/imap/mboxlist.c 2007-02-05 20:41:47.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mboxlist.c 2007-02-21 16:35:29.000000000 +0200
@@ -95,6 +95,12 @@
static int mboxlist_opensubs();
static void mboxlist_closesubs();
+static int child_cb(char *name,
+ int matchlen __attribute__((unused)),
+ int maycreate __attribute__((unused)),
+ void *rock);
+
+
static int mboxlist_rmquota(const char *name, int matchlen, int maycreate,
void *rock);
static int mboxlist_changequota(const char *name, int matchlen, int maycreate,
@@ -102,6 +108,7 @@
struct change_rock {
struct quota *quota;
+ struct quota *oldquota;
struct txn **tid;
};
@@ -889,9 +896,9 @@
*/
int mboxlist_deletemailbox(const char *name, int isadmin, char *userid,
struct auth_state *auth_state, int checkacl,
- int local_only, int force)
+ int local_only, int force, int keepQuota)
{
- int r;
+ int r, has_children = 0;
char *acl;
long access;
struct mailbox mailbox;
@@ -902,6 +909,7 @@
int mbtype;
const char *p;
mupdate_handle *mupdate_h = NULL;
+ char *quotaroot = NULL;
if(!isadmin && force) return IMAP_PERMISSION_DENIED;
@@ -1014,15 +1022,47 @@
if ((r && !force) || isremote) goto done;
- if (!r || force) r = mailbox_delete(&mailbox, deletequotaroot);
+ if (!r || force) {
+ /* first we have to keep the previous quota root in order to delete it */
+ if(mailbox.quota.root)
+ quotaroot = xstrdup(mailbox.quota.root);
+ r = mailbox_delete(&mailbox, deletequotaroot);
+ }
+
/*
* See if we have to remove mailbox's quota root
*/
- if (!r && mailbox.quota.root != NULL) {
- /* xxx look for any other mailboxes in this quotaroot */
+ if (!r && quotaroot != NULL) {
+ /* xxx look for any other mailboxes in this quotaroot */
+ /* If we have not asked to remove the quota (default behaviour), we check
+ * whether there are any subfolders beneeth the quota root. If there aren't
+ * any subfolders the reasonable thing is to delete the quota */
+ if(keepQuota) {
+ char pattern[MAX_MAILBOX_PATH+1];
+ strlcpy(pattern, quotaroot, sizeof(pattern));
+ if (config_virtdomains && name[strlen(name)-1] == '!') {
+ strlcat(pattern, "*", sizeof(pattern));
+ }
+ else {
+ strlcat(pattern, ".*", sizeof(pattern));
+ }
+ /* find if there are subfolders. Then we want to
+ * keep the existing quota */
+ mboxlist_findall(NULL, pattern, isadmin, userid,
+ auth_state, child_cb, (void *) &has_children);
+
+ if(!has_children)
+ if(!mboxlist_mylookup(quotaroot, NULL, NULL, NULL, NULL, NULL, 0, 1))
+ has_children = 1;
+ }
+ /* If we want to remove the quota explicitely or the quota root folder has no subfolders
+ * we execute the rmquota patch */
+ if(!keepQuota || !has_children )
+ mboxlist_unsetquota(quotaroot);
+ free(quotaroot);
}
-
+
done:
if(r && tid && !force) {
/* Abort the transaction if it is still in progress */
@@ -2483,6 +2523,7 @@
if (r) return r;
crock.quota = "a;
+ crock.oldquota = NULL;
crock.tid = &tid;
/* top level mailbox */
if(have_mailbox)
@@ -2501,15 +2542,19 @@
*/
int mboxlist_unsetquota(const char *root)
{
+ char newquota[MAX_MAILBOX_PATH+1];
char pattern[MAX_MAILBOX_PATH+1];
struct quota quota;
- int r=0;
+ struct change_rock crock;
+ int r=0, k=0;
if (!root[0] || root[0] == '.' || strchr(root, '/')
|| strchr(root, '*') || strchr(root, '%') || strchr(root, '?')) {
return IMAP_MAILBOX_BADNAME;
}
+ crock.tid=NULL;
+
quota.root = (char *) root;
r = quota_read("a, NULL, 0);
if (r == IMAP_QUOTAROOT_NONEXISTENT) {
@@ -2534,9 +2579,47 @@
/* submailboxes - we're using internal names here */
mboxlist_findall(NULL, pattern, 1, 0, 0, mboxlist_rmquota, (void *)root);
- r = quota_delete("a, NULL);
+ r = quota_delete("a, crock.tid);
+
+ /* If we cannot delete the quota then abort the operation */
+ if(!r) {
+ /* quota_findroot performs several checks that we can
+ * assume that are already done, and don't have to perform
+ * them again. One of them is that it returns 1 only if
+ * quotaroot exists.
+ */
+ if(quota_findroot(newquota, sizeof(newquota), root)) {
+ struct quota rootquota;
+ rootquota.root = newquota;
+ k = quota_read(&rootquota, crock.tid, 0);
+ if (!k) {
+ crock.quota = &rootquota;
+ crock.oldquota = "a;
+ /* top level mailbox */
+ k = mboxlist_changequota(root, 0, 0, &crock);
+ }
+ /* submailboxes - we're using internal names here */
+ if (!k)
+ k = mboxlist_findall(NULL, pattern, 1, 0, 0, mboxlist_changequota, &crock);
+ if(!k)
+ k = quota_write(&rootquota, crock.tid);
+
+ }
+ else {
+ /* top level mailbox */
+ mboxlist_rmquota(root, 0, 0, (void *)root);
+ /* submailboxes - we're using internal names here */
+ mboxlist_findall(NULL, pattern, 1, 0, 0, mboxlist_rmquota, (void *)root);
+ }
+ }
+
+ if(!r && !k)
+ quota_commit(crock.tid);
+ else
+ quota_abort(crock.tid);
return r;
+
}
/*
@@ -2632,6 +2715,7 @@
struct mailbox mailbox;
struct change_rock *crock = (struct change_rock *) rock;
struct quota *mboxlist_newquota = crock->quota;
+ struct quota *mboxlist_oldquota = crock->oldquota;
struct txn **tid = crock->tid;
assert(rock != NULL);
@@ -2649,27 +2733,24 @@
if (r) goto error;
if (mailbox.quota.root) {
- if (strlen(mailbox.quota.root) >= strlen(mboxlist_newquota->root)) {
- /* Part of a child quota root */
- mailbox_close(&mailbox);
- return 0;
- }
-
- r = quota_read(&mailbox.quota, tid, 1);
- if (r) goto error;
- if (mailbox.quota.used >= mailbox.quota_mailbox_used) {
- mailbox.quota.used -= mailbox.quota_mailbox_used;
- }
- else {
- mailbox.quota.used = 0;
- }
- r = quota_write(&mailbox.quota, tid);
- if (r) {
- syslog(LOG_ERR,
- "LOSTQUOTA: unable to record free of " UQUOTA_T_FMT " bytes in quota %s",
- mailbox.quota_mailbox_used, mailbox.quota.root);
- }
- free(mailbox.quota.root);
+ if(mboxlist_oldquota) {
+ if (strlen(mailbox.quota.root) > strlen(mboxlist_oldquota->root)) {
+ /* Part of a child quota root */
+ mailbox_close(&mailbox);
+ return 0;
+ }
+ }
+ else {
+ if (strlen(mailbox.quota.root) >= strlen(mboxlist_newquota->root)) {
+ /* Part of a child quota root */
+ mailbox_close(&mailbox);
+ return 0;
+ }
+ }
+
+ r = mailbox_updatequota(&mailbox,tid);
+ if (r)
+ goto error;
}
mailbox.quota.root = xstrdup(mboxlist_newquota->root);
@@ -2682,6 +2763,11 @@
error:
mailbox_close(&mailbox);
+ syslog(LOG_ERR, "LOSTQUOTA: unable to change quota root for %s to %s: %s. \
+ Command aborted. Run reconstruct to make sure mailboxes \
+ are in consistent state",
+ name, mboxlist_newquota->root, error_message(r));
+ return 1;
error_noclose:
syslog(LOG_ERR, "LOSTQUOTA: unable to change quota root for %s to %s: %s",
name, mboxlist_newquota->root, error_message(r));
diff -Naur cyrus-imapd-2.3.8/imap/mboxlist.h cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mboxlist.h
--- cyrus-imapd-2.3.8/imap/mboxlist.h 2006-11-30 19:11:19.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mboxlist.h 2007-02-21 16:35:34.000000000 +0200
@@ -126,7 +126,7 @@
* the planet */
int mboxlist_deletemailbox(const char *name, int isadmin, char *userid,
struct auth_state *auth_state, int checkacl,
- int local_only, int force);
+ int local_only, int force, int keepQuota);
/* Rename/move a mailbox (hierarchical) */
int mboxlist_renamemailbox(char *oldname, char *newname, char *partition,
diff -Naur cyrus-imapd-2.3.8/imap/mupdate.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mupdate.c
--- cyrus-imapd-2.3.8/imap/mupdate.c 2007-01-31 16:10:05.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/mupdate.c 2007-02-21 16:35:44.000000000 +0200
@@ -2313,7 +2313,7 @@
remote_boxes.head = r->next;
} else if (ret < 0) {
/* Local without corresponding remote, delete it */
- mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0);
+ mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0, 1);
local_boxes.head = l->next;
} else /* (ret > 0) */ {
/* Remote without corresponding local, insert it */
@@ -2328,7 +2328,7 @@
if(l && !r) {
/* we have more deletes to do */
while(l) {
- mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0);
+ mboxlist_deletemailbox(l->mailbox, 1, "", NULL, 0, 0, 0, 1);
local_boxes.head = l->next;
l = local_boxes.head;
}
diff -Naur cyrus-imapd-2.3.8/imap/nntpd.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/nntpd.c
--- cyrus-imapd-2.3.8/imap/nntpd.c 2007-02-05 20:49:56.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/nntpd.c 2007-02-21 16:35:53.000000000 +0200
@@ -3358,7 +3358,7 @@
/* XXX should we delete right away, or wait until empty? */
r = mboxlist_deletemailbox(mailboxname, 0,
- newsmaster, newsmaster_authstate, 1, 0, 0);
+ newsmaster, newsmaster_authstate, 1, 0, 0, 1);
if (!r) sync_log_mailbox(mailboxname);
diff -Naur cyrus-imapd-2.3.8/imap/sync_reset.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/sync_reset.c
--- cyrus-imapd-2.3.8/imap/sync_reset.c 2006-11-30 19:11:20.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/sync_reset.c 2007-02-22 13:23:41.000000000 +0200
@@ -258,7 +258,7 @@
if (r) goto fail;
for (item = list->head ; item ; item = item->next) {
- r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0);
+ r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0, 1);
if (r) goto fail;
}
@@ -274,7 +274,7 @@
if (r) goto fail;
for (item = list->head ; item ; item = item->next) {
- r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0);
+ r=mboxlist_deletemailbox(item->name, 1, NULL, sync_authstate, 1, 0, 0, 1);
if (r) goto fail;
}
@@ -282,7 +282,7 @@
/* Nuke inbox (recursive nuke possible?) */
snprintf(buf, sizeof(buf)-1, "user.%s", user);
- r = mboxlist_deletemailbox(buf, 1, "cyrus", sync_authstate, 1, 0, 0);
+ r = mboxlist_deletemailbox(buf, 1, "cyrus", sync_authstate, 1, 0, 0, 1);
if (r && (r != IMAP_MAILBOX_NONEXISTENT)) goto fail;
if ((r=user_deletedata(user, sync_userid, sync_authstate, 1)))
diff -Naur cyrus-imapd-2.3.8/imap/sync_server.c cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/sync_server.c
--- cyrus-imapd-2.3.8/imap/sync_server.c 2006-11-30 19:11:20.000000000 +0200
+++ cyrus-imapd-2.3.8-rmquota+deletemailbox.uncompiled/imap/sync_server.c 2007-02-22 13:24:17.000000000 +0200
@@ -1581,7 +1581,7 @@
for (item = list->head ; item ; item = item->next) {
r=mboxlist_deletemailbox(item->name, sync_userisadmin, sync_userid,
- sync_authstate, 0, 0, 1);
+ sync_authstate, 0, 0, 1, 1);
if (r) goto fail;
}
@@ -1591,7 +1591,7 @@
(sync_namespacep->mboxname_tointernal)(sync_namespacep, "INBOX",
user, buf);
r = mboxlist_deletemailbox(buf, sync_userisadmin, sync_userid,
- sync_authstate, 0, 0, 1);
+ sync_authstate, 0, 0, 1, 1);
if (r && (r != IMAP_MAILBOX_NONEXISTENT)) goto fail;
if ((r=user_deletedata(user, sync_userid, sync_authstate, 1)))
@@ -2526,7 +2526,7 @@
/* Delete with admin priveleges */
r = mboxlist_deletemailbox(name, sync_userisadmin, sync_userid,
- sync_authstate, 0, 0, 1);
+ sync_authstate, 0, 0, 1, 1);
if (r)
prot_printf(sync_out, "NO Failed to delete %s: %s\r\n",
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/cyrus-imapd/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore 27 Jul 2006 10:58:19 -0000 1.5
+++ .cvsignore 12 Mar 2007 16:22:52 -0000 1.6
@@ -1,4 +1,2 @@
-cyrus-imapd-2.3.1.tar.gz
cyrus_sharedbackup-0.1.tar.gz
-autoconf-2.59.tar.gz
-cyrus-imapd-2.3.7.tar.gz
+cyrus-imapd-2.3.8.tar.gz
Index: cyrus-imapd.spec
===================================================================
RCS file: /cvs/extras/rpms/cyrus-imapd/devel/cyrus-imapd.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- cyrus-imapd.spec 24 Jan 2007 12:52:37 -0000 1.20
+++ cyrus-imapd.spec 12 Mar 2007 16:22:52 -0000 1.21
@@ -1,6 +1,6 @@
Name: cyrus-imapd
-Version: 2.3.7
-Release: 8%{?dist}
+Version: 2.3.8
+Release: 1%{?dist}
# ********************** BUILD TIME OPTIONS START **********************
@@ -92,7 +92,7 @@
Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
License: BSD
Group: System Environment/Daemons
-URL: http://asg.web.cmu.edu/cyrus/imapd/
+URL: http://cyrusimap.web.cmu.edu/
#Packager: Simon Matter <simon.matter at invoca.ch>
#Vendor: Invoca Systems
#Distribution: Invoca Linux Server
@@ -131,9 +131,9 @@
Source32: cyrus-imapd.upd_groupcache
Source33: cyrus-imapd-README.skiplist_recovery
Patch0: cyrus-imapd-2.2.12-no_transfig.patch
-Patch1: cyrus-imapd-2.3.7-autocreate-0.10-0.diff
-Patch2: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.3/cyrus-imapd-2.3.3-autosieve-0.6.0.diff
-Patch3: cyrus-imapd-2.3.7-rmquota+deletemailbox.patch
+Patch1: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.8/cyrus-imapd-2.3.8-autocreate-0.10-0.diff
+Patch2: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.8/cyrus-imapd-2.3.8-autosieve-0.6.0.diff
+Patch3: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.8/cyrus-imapd-2.3.8-rmquota+deletemailbox-0.2-1.diff
Patch4: http://servercc.oakton.edu/~jwade/cyrus/cyrus-imapd-2.1.3/cyrus-imapd-2.1.3-flock.patch
Patch5: cyrus-imapd-2.2.12-munge8bit.patch
Patch6: cyrus-imapd-2.1.16-getrlimit.patch
@@ -142,7 +142,7 @@
Patch9: cyrus-imapd-2.3.1-config_defaults.patch
Patch10: cyrus-imapd-acceptinvalidfrom.patch
Patch11: cyrus-imapd-2.2.12-dam_invalid_id-christos.patch
-Patch12: cyrus-imapd-2.2.12-notify_sms.patch
+Patch12: cyrus-imapd-2.3.7-notify_sms.patch
Patch13: allow_auth_plain_proxying.patch
Patch14: cyrus-imapd-2.3.1-authid_normalize.patch
Patch15: cyrus-imapd-2.3.1-make_md5_defaults.patch
@@ -153,7 +153,7 @@
Patch100: cyrus-imapd-2.3.1-make_md5.patch
Patch101: cyrus-imapd-2.3.1-backend_sigsegv.patch
Patch102: cyrus-imapd-2.3.1-replication_policycheck.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf >= 2.59
BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl, tcp_wrappers
BuildRequires: %{_dbver}-devel, openssl-devel, pkgconfig
@@ -211,14 +211,14 @@
The %{name}-devel package contains header files and libraries
necessary for developing applications which use the imclient library.
-%package -n cyrus-imapd-perl
+%package perl
Provides: perl-Cyrus
Obsoletes: perl-Cyrus
Group: System Environment/Libraries
Summary: Cyrus IMAP server utility Perl modules
-%description -n cyrus-imapd-perl
-This package contains Perl modules necessary to use the
+%description perl
+The %{name}-perl contains Perl modules necessary to use the
Cyrus IMAP server administration utilities.
%package utils
@@ -227,7 +227,7 @@
Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd
Requires(post): grep, coreutils, make, openssl
Requires(postun): /usr/sbin/userdel, /usr/sbin/groupdel
-Requires: cyrus-imapd-perl = %{version}-%{release}
+Requires: %{name}-perl = %{version}-%{release}
%description utils
The %{name}-utils package contains administrative tools for the
@@ -238,11 +238,7 @@
%setup -q
%patch0 -p1 -b .no_transfig
%if %{AUTOCREATE}
-#%patch1 -p1 -b .autocreate
-#%patch2 -p1 -b .autosievefolder
-#%patch3 -p1 -b .rmquota
%patch1 -p1 -b .autocreate
-#%patch2 -p1 -b .autocreate1
%patch2 -p1 -b .autosieve
%patch3 -p1 -b .rmquota
%endif
@@ -308,7 +304,7 @@
--enable-idled \
%endif
%if %{_withldap}
- --with-ldap \
+ --with-ldap=/usr \
%endif
%if %{SNMP}
--with-snmp \
@@ -322,7 +318,7 @@
--with-cyrus-prefix=%{_cyrexecdir} \
--with-service-path=%{_cyrexecdir} \
--with-bdb-incdir=%{_includedir}/%{_dbver} \
- --with-extraident="Invoca-RPM-%{version}-%{release}" \
+ --with-extraident="Fedora-RPM-%{version}-%{release}" \
--with-syslogfacility=%{SYSLOGFACILITY} \
--with-krbimpl=mit
@@ -422,7 +418,7 @@
%{buildroot}%{_sysconfdir}/{rc.d/init.d,logrotate.d,pam.d,sysconfig,cron.daily} \
%{buildroot}%{_libdir}/sasl \
%{buildroot}%{_spooldata} \
- %{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup} \
+ %{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \
%if %{_withldap}
%{buildroot}%{_vardata}/ptclient \
%endif
@@ -710,6 +706,7 @@
%attr(0755,root,root) %{_cyrexecdir}/ctl_deliver
%attr(0755,root,root) %{_cyrexecdir}/ctl_mboxlist
%attr(0755,root,root) %{_cyrexecdir}/cvt_cyrusdb
+%attr(0755,root,root) %{_cyrexecdir}/cyr_dbtool
%attr(0755,root,root) %{_cyrexecdir}/cyr_expire
%attr(0755,root,root) %{_cyrexecdir}/cyrdump
%attr(0755,root,root) %{_cyrexecdir}/cyrus-master
@@ -781,6 +778,7 @@
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/md5
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/rpm
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/backup
+%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/meta
%if %{_withldap}
%attr(0700,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}/ptclient
%endif
@@ -803,7 +801,7 @@
%{_libdir}/lib*.a
%{_mandir}/man3/imclient.3*
-%files -n cyrus-imapd-perl -f cyrus-imapd-perl-%{version}-filelist
+%files perl -f cyrus-imapd-perl-%{version}-filelist
%defattr(-,root,root)
%doc perl/imap/README
%doc perl/imap/Changes
@@ -815,6 +813,9 @@
%{_mandir}/man1/*
%changelog
+* Mon Mar 12 2007 Tomas Janousek <tjanouse at redhat.com> - 2.3.8-1
+- update to latest upstream
+
* Wed Jan 24 2007 Tomas Janousek <tjanouse at redhat.com> - 2.3.7-8
- compile with kerberos support
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/cyrus-imapd/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources 27 Jul 2006 10:41:04 -0000 1.7
+++ sources 12 Mar 2007 16:22:52 -0000 1.8
@@ -1,2 +1,2 @@
-07990f3a78a3a9d728cae627e31a9caf cyrus-imapd-2.3.7.tar.gz
8f7a26b0556369827bb5c8084a3e3ea1 cyrus_sharedbackup-0.1.tar.gz
+ac03b02c1ae08d52f807b58c488b204f cyrus-imapd-2.3.8.tar.gz
--- cyrus-imapd-2.2.12-notify_sms.patch DELETED ---
--- cyrus-imapd-2.3.1-autocreate-0.10-0.diff DELETED ---
--- cyrus-imapd-2.3.1-autosievefolder-0.6-0.diff DELETED ---
--- cyrus-imapd-2.3.1-rmquota+deletemailbox-0.2-1.diff DELETED ---
More information about the fedora-extras-commits
mailing list