procmail help needed- forwarding a part of a multipart message

procmail help needed- forwarding a part of a multipart message

am 03.05.2005 19:59:29 von G

I'm new using procmail.

I have a mail which has 3 parts and the third part has attachments.
This is because a failure sending the mail.

What i need is filter by the subject of the third part and then foward
the complete third part (original message) to an e-mail address.

I need help writting the filter criteria in the .rc file. I was trying
some but i didn't find the solution.

Here, I attach how a message look using pine:

Date: Sat, 12 Feb 2005 00:38:11 -0600 (CST)
From: Mail Delivery System
To: user@machine.domain
Subject: Undelivered Mail Returned to Sender
Parts/Attachments:
1 Shown 14 lines Text, "Notification"
2 Shown 288 bytes Message, "Delivery error report"
3 Shown 50 KB Message, "Undelivered Message"
3.1 Shown 2 lines Text
3.2 211 bytes Application
3.3 23 KB Application
3.4 396 bytes Application
3.5 1.4 KB Application
3.6 39 bytes Application
3.7 196 bytes Application
3.8 1.5 KB Application
3.9 8.6 KB Application
----------------------------------------



This is the Postfix program at host machine.domain.



I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.



For further assistance, please send mail to



If you do so, please include this problem report. You can
delete your own text from the message returned below.



The Postfix program



: [recipientmachine.domain]: Name
or service not known



[ Part 2: "Delivery error report" ]



Reporting-MTA: dns; machine.domain
Arrival-Date: Sat, 12 Feb 2005 00:38:04 -0600 (CST)



Final-Recipient: rfc822; recipient@recipientmachine.domain
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; [recipientmachine.domain: Name or service
not
known






[ Part 3: "Undelivered Message" ]



Date: Sat, 12 Feb 2005 00:38:04 -0600 (CST)
From: root@machine.domain
To: recipient@recipientmachine.domain
Subject: Bit=E1coras - 2005/02/12 00:38:01 CST



Date: 2005-02-12T00:38:01-0600
Host: machine.domain



[ Part 3.2, Application/OCTET-STREAM (Name: "arch1.log.gz")
282bytes. ]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.3, Application/OCTET-STREAM (Name: "arch2.log.gz") 30KB.
]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.4, Application/OCTET-STREAM (Name: "arch3.log.gz")
528bytes. ]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.5, Application/OCTET-STREAM (Name: "arch4.log.gz") 1.9KB.
]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.6, Application/OCTET-STREAM (Name: "arch5.log.gz")
52bytes. ]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.7, Application/OCTET-STREAM (Name: "arch6.log.gz")
262bytes. ]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.8, Application/OCTET-STREAM (Name: "arch7.log.gz") 2.1KB.
]
[ Cannot display this part. Press "V" then "S" to save in a file. ]






[ Part 3.9, Application/OCTET-STREAM (Name: "arch8.log.gz") 11KB.
]
[ Cannot display this part. Press "V" then "S" to save in a file. ]



Thanks in advance.