[SVN] r451 - in /branches/cvsmerge/cyrus-cvs/imap: lmtp_sieve.c
lmtpd.c mailbox.c
debian at incase.de
debian at incase.de
Fri May 12 09:49:47 UTC 2006
Author: sven
Date: Fri May 12 11:49:46 2006
New Revision: 451
URL: https://mail.incase.de/viewcvs?rev=451&root=cyrus22&view=rev
Log:
better logging to facilitate message tracking (Wes Craig <wes at umich.edu>)
Modified:
branches/cvsmerge/cyrus-cvs/imap/lmtp_sieve.c
branches/cvsmerge/cyrus-cvs/imap/lmtpd.c
branches/cvsmerge/cyrus-cvs/imap/mailbox.c
Modified: branches/cvsmerge/cyrus-cvs/imap/lmtp_sieve.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/lmtp_sieve.c?rev=451&root=cyrus22&r1=450&r2=451&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/lmtp_sieve.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/lmtp_sieve.c Fri May 12 11:49:46 2006
@@ -1,6 +1,6 @@
/* lmtp_sieve.c -- Sieve implementation for lmtpd
*
- * $Id: lmtp_sieve.c,v 1.11 2005/11/21 16:26:16 murch Exp $
+ * $Id: lmtp_sieve.c,v 1.12 2006/05/10 16:27:17 murch Exp $
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -327,6 +327,8 @@
sievedb, strlen(sievedb), time(NULL), 0);
snmp_increment(SIEVE_REDIRECT, 1);
+ syslog(LOG_INFO, "sieve redirected: %s to: %s",
+ m->id ? m->id : "<nomsgid>", rc->addr);
return SIEVE_OK;
} else {
if (res == -1) {
@@ -349,17 +351,8 @@
snmp_increment(SIEVE_DISCARD, 1);
/* ok, we won't file it, but log it */
- if (md->id && strlen(md->id) < 80) {
- char pretty[160];
-
- beautify_copy(pretty, md->id);
- syslog(LOG_INFO, "sieve: discarded message to %s id %s",
- sd->username, pretty);
- }
- else {
- syslog(LOG_INFO, "sieve: discarded message to %s",
- sd->username);
- }
+ syslog(LOG_INFO, "sieve discarded: %s",
+ md->id ? md->id : "<nomsgid>");
return SIEVE_OK;
}
@@ -383,7 +376,7 @@
if (strlen(md->return_path) == 0) {
syslog(LOG_INFO, "sieve: discarded reject to <> for %s id %s",
- sd->username, md->id);
+ sd->username, md->id ? md->id : "<nomsgid>");
return SIEVE_OK;
}
@@ -393,6 +386,8 @@
origreceip, sd->username,
rc->msg, md->data)) == 0) {
snmp_increment(SIEVE_REJECT, 1);
+ syslog(LOG_INFO, "sieve rejected: %s to: %s",
+ md->id ? md->id : "<nomsgid>", md->return_path);
return SIEVE_OK;
} else {
if (res == -1) {
Modified: branches/cvsmerge/cyrus-cvs/imap/lmtpd.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/lmtpd.c?rev=451&root=cyrus22&r1=450&r2=451&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/lmtpd.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/lmtpd.c Fri May 12 11:49:46 2006
@@ -1,6 +1,6 @@
/* lmtpd.c -- Program to deliver mail to a mailbox
*
- * $Id: lmtpd.c,v 1.143 2006/01/20 20:29:33 jeaton Exp $
+ * $Id: lmtpd.c,v 1.144 2006/05/10 16:27:17 murch Exp $
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -321,6 +321,7 @@
strlen(mailboxname), now, uid);
append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
+ syslog(LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname);
}
}
Modified: branches/cvsmerge/cyrus-cvs/imap/mailbox.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/mailbox.c?rev=451&root=cyrus22&r1=450&r2=451&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/mailbox.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/mailbox.c Fri May 12 11:49:46 2006
@@ -1,5 +1,5 @@
/* mailbox.c -- Mailbox manipulation routines
- * $Id: mailbox.c,v 1.159 2005/04/07 00:25:52 shadow Exp $
+ * $Id: mailbox.c,v 1.160 2006/05/10 16:27:18 murch Exp $
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -1931,6 +1931,11 @@
}
}
+ if (numdeleted > 0) {
+ syslog(LOG_NOTICE, "Expunged %d messages from %s",
+ numdeleted, mailbox->name);
+ }
+
free(buf);
if (deleted) free(deleted);
@@ -2187,6 +2192,7 @@
*tail = '\0';
} while (rmdir(buf) == 0 && (tail = strrchr(buf, '/')));
+ syslog(LOG_NOTICE, "Deleted mailbox %s", mailbox->name);
mailbox_close(mailbox);
return 0;
}
More information about the Pkg-Cyrus-imapd-Debian-devel
mailing list