steffen: server/imapd imapd.morelogging.patch, NONE, 1.1 Makefile, 1.24, 1.25 kolab.patch, 1.26, 1.27
cvs at intevation.de
cvs at intevation.de
Sat Sep 17 14:22:01 CEST 2005
Author: steffen
Update of /kolabrepository/server/imapd
In directory doto:/tmp/cvs-serv5257
Modified Files:
Makefile kolab.patch
Added Files:
imapd.morelogging.patch
Log Message:
applied morelogging patches from Issue928
--- NEW FILE: imapd.morelogging.patch ---
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);
Index: Makefile
===================================================================
RCS file: /kolabrepository/server/imapd/Makefile,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Makefile 22 Jul 2005 22:36:14 -0000 1.24
+++ Makefile 17 Sep 2005 12:21:58 -0000 1.25
@@ -19,13 +19,14 @@
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
Index: kolab.patch
===================================================================
RCS file: /kolabrepository/server/imapd/kolab.patch,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- kolab.patch 31 Aug 2005 01:55:58 -0000 1.26
+++ kolab.patch 17 Sep 2005 12:21:58 -0000 1.27
@@ -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
More information about the commits
mailing list