We got a report today from one of our customers that they are unable to "redirect" mail with attachments off-site. At first I was skeptical, because sieve does not mess with the message body... but sure enough, it's easy to reproduce:
- Create a new address (mailbox)
- Create a single sieve "redirect" filter for that address, pointing to my own mailbox
- Send it a message with an attachment
- An attachment is visible on the message that arrives, but it is corrupt
For example:
$ cat hello.original.txt Hello, world!
but
$ cat hello.attached.txt
(it's empty). Sending a JPEG image is a bit more enlightening:
$ /bin/ls -l *jpg -rw------- 1 mjo mjo 337119 Dec 18 11:15 image.attached.jpg -rw-r--r-- 1 mjo mjo 337173 Dec 18 11:13 image.original.jpg
So something _is_ sent, but the start of the file is corrupt. Looking at it in a hex editor, it's only the first few lines that are messed up.
This is with dovecot 2.4.2, but notably, we are using zlib compression:
mail_plugins = mail_compress mail_compress_write_method = gz
I'm curious if anyone else can reproduce this? Redirecting via sieve is not common, so this isn't an emergency, but obviously it is preferable to have it working.