Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion deliver-imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ deliver_imap_deliver(struct deliver_ctx *dctx, struct actitem *ti)
struct io *io;
struct fetch_ctx fctx;
struct fetch_imap_data fdata;
char *cause, *folder, *ptr, *line;
char *cause, *folder, *ptr, *line, *exchange_version;
size_t len, maillen;
u_int total, body;

Expand Down Expand Up @@ -235,6 +235,13 @@ deliver_imap_deliver(struct deliver_ctx *dctx, struct actitem *ti)
*/
count_lines(m, &total, &body);
maillen = m->size + total - 1;
exchange_version = getenv("FDM_EXCHANGE_VERSION");
if (exchange_version != NULL) {
if (strncmp(exchange_version, "2007", strlen(exchange_version)) == 0) {
log_debug2("%s: reducing size by 1 for Exchange %s", a->name, exchange_version);
maillen--;
}
}
if (fdata.capa & IMAP_CAPA_XYZZY) {
log_debug2("%s: adjusting size: actual %zu", a->name, maillen);
maillen = m->size;
Expand Down