summaryrefslogtreecommitdiff
path: root/imapd
diff options
context:
space:
mode:
authorSteffen Hansen <steffen@kdab.com>2005-09-17 12:21:58 (GMT)
committerSteffen Hansen <steffen@kdab.com>2005-09-17 12:21:58 (GMT)
commit4b3b49d8b00a4422526e96d6681d928b28b1ecc6 (patch)
treef69174dc30aee3f441f70fd8b25a1e06840826bc /imapd
parentf8bc85a9c8c80b4aafa114f96534bef5f446a4b5 (diff)
downloadserver-4b3b49d8b00a4422526e96d6681d928b28b1ecc6.tar.gz
applied morelogging patches from Issue928
Diffstat (limited to 'imapd')
-rw-r--r--imapd/Makefile3
-rw-r--r--imapd/imapd.morelogging.patch98
-rw-r--r--imapd/kolab.patch21
3 files changed, 113 insertions, 9 deletions
diff --git a/imapd/Makefile b/imapd/Makefile
index b849236..d32b8e1 100644
--- a/imapd/Makefile
+++ b/imapd/Makefile
@@ -19,13 +19,14 @@ all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
cp $(KOLABCVSDIR)/cyradm.annotate.patch $(KOLABRPMSRC)/$(PACKAGE)/
cp $(KOLABCVSDIR)/imapd.annotate.patch $(KOLABRPMSRC)/$(PACKAGE)/
+ cp $(KOLABCVSDIR)/imapd.morelogging.patch $(KOLABRPMSRC)/$(PACKAGE)/
cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for imapd.spec
cp $(KOLABCVSDIR)/imapd.group2.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for case insensitive group match
cp $(KOLABCVSDIR)/imapd-goodchars.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for allowing special chars in mailbox names
cp $(KOLABCVSDIR)/kolab-ldap.patch $(KOLABRPMSRC)/$(PACKAGE)/
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_group yes' --define 'with_atvdom yes' --define 'with_annotate yes' --define 'with_ldap yes' --define 'with_goodchars yes'
+ cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_group yes' --define 'with_atvdom yes' --define 'with_annotate yes' --define 'with_ldap yes' --define 'with_goodchars yes' --define 'with_morelogging yes'
imapd-$(VERSION)-$(RELEASE).src.rpm:
wget -c $(KOLABPKGURI)/imapd-$(VERSION)-$(RELEASE).src.rpm
diff --git a/imapd/imapd.morelogging.patch b/imapd/imapd.morelogging.patch
new file mode 100644
index 0000000..609ac26
--- /dev/null
+++ b/imapd/imapd.morelogging.patch
@@ -0,0 +1,98 @@
+diff -upr cyrus-imapd-2.2.12.orig/imap/append.c cyrus-imapd-2.2.12/imap/append.c
+--- cyrus-imapd-2.2.12.orig/imap/append.c 2004-05-22 05:45:48.000000000 +0200
++++ cyrus-imapd-2.2.12/imap/append.c 2005-09-17 13:32:48.000000000 +0200
+@@ -549,6 +549,8 @@ int append_fromstage(struct appendstate
+ lseek(mailbox->cache_fd, 0L, SEEK_END);
+
+ /* Create message file */
++ syslog(LOG_DEBUG, "append_fromstage: create message %s:%d",
++ as->m.name, message_index.uid);
+ as->nummsg++;
+ strlcpy(fname, mailbox->path, sizeof(fname));
+ strlcat(fname, "/", sizeof(fname));
+diff -upr cyrus-imapd-2.2.12.orig/imap/imapd.c cyrus-imapd-2.2.12/imap/imapd.c
+--- cyrus-imapd-2.2.12.orig/imap/imapd.c 2005-02-14 07:39:55.000000000 +0100
++++ cyrus-imapd-2.2.12/imap/imapd.c 2005-09-17 13:32:48.000000000 +0200
+@@ -3635,6 +3635,9 @@ char *sequence;
+ {
+ int r;
+
++ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
++ imapd_userid, imapd_mailbox->name, sequence ? sequence : "''");
++
+ if (!(imapd_mailbox->myrights & ACL_DELETE)) r = IMAP_PERMISSION_DENIED;
+ else if (sequence) {
+ r = mailbox_expunge(imapd_mailbox, 1, index_expungeuidlist, sequence);
+diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpd.c cyrus-imapd-2.2.12/imap/lmtpd.c
+--- cyrus-imapd-2.2.12.orig/imap/lmtpd.c 2004-12-17 17:32:15.000000000 +0100
++++ cyrus-imapd-2.2.12/imap/lmtpd.c 2005-09-17 13:29:16.000000000 +0200
+@@ -299,7 +299,10 @@ int deliver_mailbox(struct protstream *m
+ prot_rewind(msg);
+ r = append_fromstage(&as, stage, now,
+ (const char **) flag, nflags, !singleinstance);
+- if (!r) append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
++ if (!r) {
++ append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
++ syslog( LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname );
++ }
+ else append_abort(&as);
+ }
+
+diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c cyrus-imapd-2.2.12/imap/lmtpproxyd.c
+--- cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c 2004-12-17 17:32:16.000000000 +0100
++++ cyrus-imapd-2.2.12/imap/lmtpproxyd.c 2005-09-17 13:29:41.000000000 +0200
+@@ -471,6 +471,11 @@ static void runme(struct mydata *mydata,
+ /* this is the only delivery we're attempting for this rcpt */
+ msg_setrcpt_status(msgdata, j, lt->rcpt[i].r);
+ mydata->pend[j] = done;
++
++ if (lt->rcpt[i].result == RCPT_GOOD) {
++ syslog (LOG_NOTICE, "Message: %s delivered to: %s@%s",
++ msgdata->id, d->to, d->server);
++ }
+ break;
+ case done:
+ case s_done:
+diff -upr cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c cyrus-imapd-2.2.12/imap/lmtp_sieve.c
+--- cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c 2004-06-01 15:47:16.000000000 +0200
++++ cyrus-imapd-2.2.12/imap/lmtp_sieve.c 2005-09-17 12:07:52.000000000 +0200
+@@ -339,6 +339,7 @@ static int sieve_redirect(void *ac,
+ if (sievedb) duplicate_mark(buf, strlen(buf),
+ sievedb, strlen(sievedb), time(NULL), 0);
+
++ syslog( LOG_INFO, "sieve redirected: %s to: %s", m->id, rc->addr);
+ snmp_increment(SIEVE_REDIRECT, 1);
+ return SIEVE_OK;
+ } else {
+@@ -406,6 +407,7 @@ static int sieve_reject(void *ac,
+ origreceip, sd->username,
+ rc->msg, md->data)) == 0) {
+ snmp_increment(SIEVE_REJECT, 1);
++ syslog( LOG_INFO, "sieve rejected: %s to: %s", md->id, md->return_path);
+ return SIEVE_OK;
+ } else {
+ if (res == -1) {
+diff -upr cyrus-imapd-2.2.12.orig/imap/mailbox.c cyrus-imapd-2.2.12/imap/mailbox.c
+--- cyrus-imapd-2.2.12.orig/imap/mailbox.c 2005-02-14 07:39:57.000000000 +0100
++++ cyrus-imapd-2.2.12/imap/mailbox.c 2005-09-17 13:32:48.000000000 +0200
+@@ -1911,6 +1911,8 @@ mailbox_expunge(struct mailbox *mailbox,
+ /* Delete message files */
+ *fnametail++ = '/';
+ for (msgno = 0; msgno < numdeleted; msgno++) {
++ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
++ mailbox->name, deleted[msgno]);
+ if (iscurrentdir) {
+ char shortfnamebuf[MAILBOX_FNAME_LEN];
+ mailbox_message_get_fname(mailbox, deleted[msgno],
+@@ -1925,6 +1927,11 @@ mailbox_expunge(struct mailbox *mailbox,
+ }
+ }
+
++ if (numdeleted > 0) {
++ syslog (LOG_NOTICE, "Deleted %d messages from %s",
++ numdeleted, mailbox->name);
++ }
++
+ free(buf);
+ if (deleted) free(deleted);
+
diff --git a/imapd/kolab.patch b/imapd/kolab.patch
index 0fb5790..e926edc 100644
--- a/imapd/kolab.patch
+++ b/imapd/kolab.patch
@@ -1,5 +1,5 @@
--- ../imapd.orig/imapd.spec 2005-06-15 20:55:40.000000000 +0200
-+++ imapd.spec 2005-08-30 02:09:35.000000000 +0200
++++ imapd.spec 2005-09-17 14:00:18.000000000 +0200
@@ -2,6 +2,9 @@
## imapd.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
@@ -10,12 +10,12 @@
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
-@@ -33,13 +36,16 @@ Class: BASE
+@@ -33,13 +36,17 @@ Class: BASE
Group: Mail
License: BSD
Version: 2.2.12
-Release: 2.4.0
-+Release: 2.4.0_kolab2
++Release: 2.4.0_kolab3
# package options
-%option with_fsl yes
@@ -29,10 +29,11 @@
+%option with_annotate no
+%option with_ldap no
+%option with_goodchars no
++%option with_morelogging no
# list of sources
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
-@@ -49,6 +55,11 @@ Source3: imapd.conf
+@@ -49,6 +56,12 @@ Source3: imapd.conf
Source4: fsl.imapd
Patch0: imapd.patch
Patch1: imapd.patch.group
@@ -41,10 +42,11 @@
+Patch4: imapd.group2.patch
+Patch5: imapd-goodchars.patch
+Patch6: cyradm.annotate.patch
++Patch7: imapd.morelogging.patch
# build information
Prefix: %{l_prefix}
-@@ -61,6 +72,10 @@ PreReq: sasl, db >= 4.2.52, openss
+@@ -61,6 +74,10 @@ PreReq: sasl, db >= 4.2.52, openss
BuildPreReq: fsl >= 1.2.0
PreReq: fsl >= 1.2.0
%endif
@@ -55,7 +57,7 @@
AutoReq: no
AutoReqProv: no
-@@ -87,6 +102,7 @@ AutoReqProv: no
+@@ -87,6 +104,7 @@ AutoReqProv: no
%{l_shtool} subst \
-e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
lib/auth_unix.c
@@ -63,7 +65,7 @@
%endif
%if "%{with_drac}" == "yes"
%{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
-@@ -94,10 +110,21 @@ AutoReqProv: no
+@@ -94,10 +112,24 @@ AutoReqProv: no
sleep 1
touch configure
%endif
@@ -77,6 +79,9 @@
+ %patch -p1 -P 5
+%endif
+ %patch -p0 -P 6
++%if "%{with_morelogging}" == "yes"
++ %patch -p1 -P 7
++%endif
%{l_shtool} subst \
-e 's;-L/usr/local/lib;;g' \
-e 's;-I/usr/local/include;;g' \
@@ -86,7 +91,7 @@
configure
# ensure local et/com_err can be found
-@@ -158,6 +185,11 @@ AutoReqProv: no
+@@ -158,6 +190,11 @@ AutoReqProv: no
-e '/config_init/s;"deliver";"cyrdeliver";' \
imap/deliver.c