procmail
[Top] [All Lists]

formail -A command corrupting attachments

2009-03-07 01:23:12
I have had the same recipe file for years but for recently I started
having a problem where attachments such as PNG files, JPEGs, Acrobat
files etc were getting corrupted. I have tracked this down to a
formail line in a procmail recipe.

This recipe adds a message header called "X-PMERule" but attachments
get corrupted:
:0:
* ^TO_.*
| formail -A "X-PMERule: Pass thro to default">>$DEFAULT

Message header in email looks like this:
<snip>
Subject: test attach 21
From: Phill Edwards <philledwards(_at_)gmail(_dot_)com>
To: Phill Edwards <philledwards(_at_)ozemail(_dot_)com(_dot_)au>
Content-Type: multipart/mixed; boundary=001636e1fbd1a7852a046480b454
X-PMERule: Pass thro to default

--001636e1fbd1a7852a046480b454
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Mail header added

--001636e1fbd1a7852a046480b454
Content-Type: image/png; name="squeezeplay1.png"
Content-Disposition: attachment; filename="squeezeplay1.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_frzuxcwd0
</snip>



This recipe DOESN'T add a message header and attachments are fine:
:0:
* ^TO_.*
$DEFAULT

Message header in email looks like this:
<snip>
Subject: test attach 23
From: Phill Edwards <philledwards(_at_)gmail(_dot_)com>
To: Phill Edwards <philledwards(_at_)ozemail(_dot_)com(_dot_)au>
Content-Type: multipart/mixed; boundary=000e0cd17ea8a77615046480c037

--000e0cd17ea8a77615046480c037
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

No mail header added

--000e0cd17ea8a77615046480c037
Content-Type: image/png; name="squeezeplay1.png"
Content-Disposition: attachment; filename="squeezeplay1.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_frzv1ngd0
</snip>

Any ideas why the attachment is getting coruppted and how I can avoid
that happening? I'd like to keep adding the header if possible.

Regards,
Phill
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail