summaryrefslogtreecommitdiff
path: root/imapd/imapd.morelogging.patch
blob: 9fa02e9735b5cff9fa512c6c22e97dcaf193da92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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 19:45:53.000000000 +0200
@@ -636,6 +636,9 @@ int append_fromstage(struct appendstate 
     /* ok, we've successfully added a message */
     as->quota_used += message_index.size;
 
+    syslog(LOG_DEBUG, "append_fromstage: message %d added to %s",
+	   message_index.uid, mailbox->name );
+
     return 0;
 }
 
Only in cyrus-imapd-2.2.12/imap: append.c~
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 23:29:45.000000000 +0200
@@ -3652,6 +3652,8 @@ char *sequence;
     else {
 	prot_printf(imapd_out, "%s OK %s\r\n", tag,
 		    error_message(IMAP_OK_COMPLETED));
+	syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
+	       imapd_userid, imapd_mailbox->name, sequence ? sequence : "''");
     }
 }    
 
Only in cyrus-imapd-2.2.12/imap: imapd.c~
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 19:41:05.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 19:41:05.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 19:41:05.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 19:41:05.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);