On Thu, Apr 10, 2003 at 04:28:38AM +0200, Christoph Heuel wrote:
I try to find a solution for rewrite the MIME-field for some mails.
For example, I get a mail with a pdf-file, but the the "Content-Type"
of the mail contains "apllication/octet-stream". So, IMHO, it better
would "application/pdf" would be better to get the rigth application
to show the file.
You can use formail, part of the procmail package, to rewrite
headers. See `man formail'. Here is an example:
:0 fw # brackets below contain space and tab
* HB ^Content-Type: application/octet-stream;\/[ ]name=.*\.pdf"
| formail -i"Content-Type: application/pdf;$MATCH"
However, if there are multiple attachment, you have a hoarier problem.
Then you might need to pipe to a shell script or revert to a
recursive INCLUDERC, for which see the list archives and Be
Very Careful.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail