diff options
Diffstat (limited to 'libproto/mbox/mbox.c')
-rw-r--r-- | libproto/mbox/mbox.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c index 62507657e..cc412ff37 100644 --- a/libproto/mbox/mbox.c +++ b/libproto/mbox/mbox.c @@ -30,2 +30,3 @@ #include <mailutils/io.h> +#include <mailutils/filter.h> @@ -1035,3 +1036,3 @@ append_message_to_stream (mu_stream_t ostr, mu_message_t msg, int status; - mu_stream_t istr; + mu_stream_t istr, flt; @@ -1086,6 +1087,14 @@ append_message_to_stream (mu_stream_t ostr, mu_message_t msg, } - status = mu_stream_copy (ostr, istr, 0, NULL); - mu_stream_destroy (&istr); + + status = mu_filter_create (&flt, istr, "FROM", + MU_FILTER_ENCODE, MU_STREAM_READ); + mu_stream_unref (istr); if (status == 0) - status = mu_stream_write (ostr, "\n", 1, NULL); + { + status = mu_stream_copy (ostr, flt, 0, NULL); + mu_stream_destroy (&flt); + if (status == 0) + status = mu_stream_write (ostr, "\n", 1, NULL); + } + return status; |