commit bac2b00f1bb5148fe233e6259a663508e5daed84
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Dec 13 18:29:14 2014 +0100
disable use of LITERAL+ for payloads > 100k
when LITERAL+ is used, the server has no chance for early rejection of
messages. this means that the client can upload megabytes for nothing.
so simply don't use LITERAL+ for big messages. of course this adds
server roundtrips, but that's tough luck.
the limit could be arguably higher than 100k (or even configurable).
i set it to ~2 sec with my fairly average DSL line.
src/drv_imap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 7f8f821..aa13f97 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -271,7 +271,7 @@ send_imap_cmd( imap_store_t *ctx, struct imap_cmd *cmd )
if (!cmd->param.data) {
buffmt = "%d %s\r\n";
litplus = 0;
- } else if ((cmd->param.to_trash && ctx->trashnc == TrashUnknown) ||
!CAP(LITERALPLUS)) {
+ } else if ((cmd->param.to_trash && ctx->trashnc == TrashUnknown) ||
!CAP(LITERALPLUS) || cmd->param.data_len >= 100*1024) {
buffmt = "%d %s{%d}\r\n";
litplus = 0;
} else {
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel