[arch-commits] Commit in dbmail/trunk (PKGBUILD log-imap.patch)
Sergej Pupykin
spupykin at archlinux.org
Fri Apr 8 17:06:13 UTC 2016
Date: Friday, April 8, 2016 @ 19:06:12
Author: spupykin
Revision: 169768
Added:
dbmail/trunk/log-imap.patch
Modified:
dbmail/trunk/PKGBUILD
----------------+
PKGBUILD | 7 +++++--
log-imap.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-04-08 16:56:54 UTC (rev 169767)
+++ PKGBUILD 2016-04-08 17:06:12 UTC (rev 169768)
@@ -27,17 +27,20 @@
"dbmail-lmtpd.xinetd"
"dbmail-pop3d.xinetd"
"dbmail-timsieved.xinetd"
- noop-fetch-response-fix2.patch)
+ noop-fetch-response-fix2.patch
+ log-imap.patch)
md5sums=('4f140751642559395dfe3a6bb2cc9300'
'890de13361afbdf4fed12d6d7eb53e66'
'961593658cd596297d03d25eb9c9e98f'
'4cb764894abd3914802e90602bf90a0c'
'e78dc86355f9aaf24590bc7c6611162f'
- '8c8efca631d3a4052ad18c12ce72a1ab')
+ '8c8efca631d3a4052ad18c12ce72a1ab'
+ 'e01223ad8e9c1a0faea40f18ea064b66')
prepare() {
cd $srcdir/dbmail-${pkgver}/
patch -p1 <$srcdir/noop-fetch-response-fix2.patch
+# patch -p1 <$srcdir/log-imap.patch
}
build() {
Added: log-imap.patch
===================================================================
--- log-imap.patch (rev 0)
+++ log-imap.patch 2016-04-08 17:06:12 UTC (rev 169768)
@@ -0,0 +1,47 @@
+diff -wbBur dbmail-3.2.3/src/dm_debug.c dbmail-3.2.3.my/src/dm_debug.c
+--- dbmail-3.2.3/src/dm_debug.c 2015-01-25 13:20:50.000000000 +0300
++++ dbmail-3.2.3.my/src/dm_debug.c 2016-04-08 19:51:11.837835259 +0300
+@@ -98,7 +98,8 @@
+ "Notice",
+ "Info",
+ "Debug",
+- "Database"
++ "Database",
++ "Network"
+ };
+ return Trace_Text[ilogb((double) level)];
+ }
+diff -wbBur dbmail-3.2.3/src/dm_debug.h dbmail-3.2.3.my/src/dm_debug.h
+--- dbmail-3.2.3/src/dm_debug.h 2015-01-25 13:20:50.000000000 +0300
++++ dbmail-3.2.3.my/src/dm_debug.h 2016-04-08 18:54:33.797752209 +0300
+@@ -36,7 +36,8 @@
+ TRACE_NOTICE = 32,
+ TRACE_INFO = 64,
+ TRACE_DEBUG = 128,
+- TRACE_DATABASE = 256 // Logs at Debug Level
++ TRACE_DATABASE = 256, // Logs at Debug Level
++ TRACE_NETWORK = 512 // Logs at Debug Level
+ } Trace_T;
+
+
+diff -wbBur dbmail-3.2.3/src/imap4.c dbmail-3.2.3.my/src/imap4.c
+--- dbmail-3.2.3/src/imap4.c 2015-01-25 13:20:50.000000000 +0300
++++ dbmail-3.2.3.my/src/imap4.c 2016-04-08 20:01:05.247849764 +0300
+@@ -784,6 +784,16 @@
+
+ imap_unescape_args(session);
+
+- TRACE(TRACE_INFO, "dispatch [%s]...\n", IMAP_COMMANDS[session->command_type]);
++ char caddr_buf[64];
++ TRACE(TRACE_NETWORK, "Dispatch: client:%s, uid:%d, cmd:%s, rxed: %u, txed: %u\n",
++ inet_ntop(session->ci->sock->caddr.sa_family,
++ (const void*)&((struct sockaddr_in*)&session->ci->sock->caddr)->sin_addr,
++ caddr_buf,
++ session->ci->sock->caddr_len),
++ (int)session->userid,
++ IMAP_COMMANDS[session->command_type],
++ (unsigned)session->ci->bytes_rx,
++ (unsigned)session->ci->bytes_tx);
++
+ return (*imap_handler_functions[session->command_type]) (session);
+ }
More information about the arch-commits
mailing list