[dovecot-cvs] dovecot/src/plugins/mail-log mail-log-plugin.c, 1.5, 1.6
tss at dovecot.org
tss at dovecot.org
Sat Mar 10 14:54:23 EET 2007
- Previous message: [dovecot-cvs] dovecot/src/plugins/mail-log mail-log-plugin.c, 1.1.2.4, 1.1.2.5
- Next message: [dovecot-cvs] dovecot/src/auth db-passwd-file.c, 1.25.2.3, 1.25.2.4 passdb-bsdauth.c, 1.14.2.1, 1.14.2.2 passdb-cache.c, 1.17.2.4, 1.17.2.5 passdb-checkpassword.c, 1.18.2.11, 1.18.2.12 passdb-pam.c, 1.37.2.10, 1.37.2.11 passdb-passwd.c, 1.17, 1.17.2.1 passdb-shadow.c, 1.18, 1.18.2.1 passdb-sia.c, 1.1.2.1, 1.1.2.2 passdb-vpopmail.c, 1.24.2.1, 1.24.2.2 userdb-passwd.c, 1.18.2.3, 1.18.2.4 userdb-prefetch.c, 1.3.2.2, 1.3.2.3 userdb-vpopmail.c, 1.21.2.2, 1.21.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/plugins/mail-log
In directory talvi:/tmp/cvs-serv32221
Modified Files:
mail-log-plugin.c
Log Message:
Log the mailbox name, unless it's INBOX.
Index: mail-log-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/mail-log/mail-log-plugin.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mail-log-plugin.c 28 Feb 2007 21:00:39 -0000 1.5
+++ mail-log-plugin.c 10 Mar 2007 12:54:20 -0000 1.6
@@ -38,11 +38,22 @@
static void mail_log_action(struct mail *mail, const char *action)
{
- const char *msgid;
+ const char *msgid, *mailbox_str;
+
+ mailbox_str = mailbox_get_name(mail->box);
+ if (strcmp(mailbox_str, "INBOX") == 0) {
+ /* most operations are for INBOX, and POP3 has only INBOX,
+ so don't add it. */
+ mailbox_str = "";
+ } else {
+ mailbox_str = str_sanitize(mailbox_str, 80);
+ mailbox_str = t_strconcat(", box=", mailbox_str, NULL);
+ }
msgid = mail_get_first_header(mail, "Message-ID");
- i_info("%s: uid=%u, msgid=%s", action, mail->uid,
- msgid == NULL ? "(null)" : str_sanitize(msgid, MSGID_LOG_LEN));
+ i_info("%s: uid=%u, msgid=%s%s", action, mail->uid,
+ msgid == NULL ? "(null)" : str_sanitize(msgid, MSGID_LOG_LEN),
+ mailbox_str);
}
static int mail_log_mail_expunge(struct mail *_mail)
- Previous message: [dovecot-cvs] dovecot/src/plugins/mail-log mail-log-plugin.c, 1.1.2.4, 1.1.2.5
- Next message: [dovecot-cvs] dovecot/src/auth db-passwd-file.c, 1.25.2.3, 1.25.2.4 passdb-bsdauth.c, 1.14.2.1, 1.14.2.2 passdb-cache.c, 1.17.2.4, 1.17.2.5 passdb-checkpassword.c, 1.18.2.11, 1.18.2.12 passdb-pam.c, 1.37.2.10, 1.37.2.11 passdb-passwd.c, 1.17, 1.17.2.1 passdb-shadow.c, 1.18, 1.18.2.1 passdb-sia.c, 1.1.2.1, 1.1.2.2 passdb-vpopmail.c, 1.24.2.1, 1.24.2.2 userdb-passwd.c, 1.18.2.3, 1.18.2.4 userdb-prefetch.c, 1.3.2.2, 1.3.2.3 userdb-vpopmail.c, 1.21.2.2, 1.21.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list