Joshua Goodall
2006-Jul-19 09:30 UTC
[Dovecot] data corruption in delivery agent when forwarding
Hi Timo
I've been seeing data corruption in the lda when forwarding mail. I think
it's due to confused file pointers. (this is all maildirs on nfs)
Anyway the following patch fixes it, and also looks a bit more like the
old dovecot-lda module, by getting the Return-Path header before
getting the input stream:
Index: mail-send.c
==================================================================RCS file:
/home/cvs/dovecot/src/deliver/mail-send.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 mail-send.c
--- mail-send.c 11 Jun 2006 11:10:55 -0000 1.1.2.1
+++ mail-send.c 19 Jul 2006 09:28:18 -0000
@@ -116,16 +116,17 @@
struct smtp_client *smtp_client;
FILE *f;
const unsigned char *data;
+ const char *return_path;
size_t size;
int ret;
+ return_path = mail_get_first_header(mail, "Return-Path");
+
input = mail_get_stream(mail, NULL, NULL);
if (input == NULL)
return -1;
- smtp_client = smtp_client_open(forwardto,
- mail_get_first_header(mail, "Return-Path"),
- &f);
+ smtp_client = smtp_client_open(forwardto, return_path, &f);
input = i_stream_create_header_filter(input, HEADER_FILTER_EXCLUDE |
HEADER_FILTER_NO_CR, hide_headers,
best regards as ever
/k
--
Josh "Koshua" Goodall "as modern as tomorrow
afternoon"
joshua at roughtrade.net - FW109
Seemingly Similar Threads
- PATCH: Deliver looses mail and DSN if Return-Path is missing
- [LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"
- ugly hack to make maildir quotas work
- [LLVMdev] Any value in pre-simplifying the DAG?
- [LLVMdev] Any value in pre-simplifying the DAG?
