Hi, In message <_A4870@delegate-en.ML_> on 07/13/10(03:36:01) you Simon Guilhot <payjqbdyi-efh3miqjke66.ml@delegate.org> wrote: |I spend the day working with the product. After spending some weeks using |it, I can say that the product are great but I found, at start the manual |quite hard to apprehend. | |I played a lot with the CFI script and I manage with the second unit to |rewrite the subject and the from: field. |---------------------------------- |#!cfi |Content-Type: text/plain |Content-Type: text/html |Body-Filter: echo "something" |-- |Header-Filter: sed -e 's/^From: [+-z]*/From: the@email../g;s/^Subject: |[!-~]*/Subject: The Subject Wanted/g |----------------------------------- | |The last thing I wanna do is to rewrite only the body of the mail, excluding |the MIME type png or gif. I don't find a efficient way to do it. The |simplest way I can think about (the first unit) was to write only the body |when it match the type "text" ; but it didn't work. | |Any idea to enlight me ? I can't see what didn't work and how. Your CFI scripts for FTOSV seems to work as follows: 07/13 07:40:42.19 [26598] 1+0: -- Fork(FTOSV): 26597 -> 26598 07/13 07:40:42.19 [26598] 1+0: #### execFilter[FTOSV] CFI 07/13 07:40:42.20 [26598] 1+0: ## CFI/smtp ## 07/13 07:40:42.20 [26598] 1+0: ## CFI/MSGS ## ... 07/13 07:40:42.37 [26597] 1+0: SMTP < MAIL From:test-from@delegate.org 07/13 07:40:42.37 [26598] 1+0: CFI/MSGS ---- MAIL From:test-from@delegate.org^M 07/13 07:40:42.51 [26597] 1+0: SMTP > 250 2.1.0 test-from@delegate.org... Sender ok^M 07/13 07:40:42.51 [26597] 1+0: SMTP < RCPT To:yutaka 07/13 07:40:42.52 [26598] 1+0: CFI/MSGS ---- RCPT To:yutaka^M 07/13 07:40:42.53 [26597] 1+0: SMTP > 250 2.1.5 yutaka... Recipient ok^M 07/13 07:40:42.54 [26597] 1+0: SMTP < DATA 07/13 07:40:42.55 [26598] 1+0: CFI/MSGS ---- DATA^M 07/13 07:40:42.58 [26597] 1+0: SMTP > 354 Enter mail, end with "." on a line by itself^M 07/13 07:40:42.65 [26598] 1+0: CFI/MSGS ---- --MESSAGE/mime DATA^M 07/13 07:40:42.66 [26598] 1+0: systemFilter[1,3]: echo "something" 07/13 07:40:42.68 [26598] 1+0: putMIMEmsg: Content-Length: 0 -> 10 (78 - 68) [] 07/13 07:40:42.72 [26597] 1+0: SMTP > 250 2.0.0 o6CMeYv14030 Message accepted for delivery^M 07/13 07:40:42.72 [26597] 1+0: SMTP < QUIT 07/13 07:40:42.72 [26598] 1+0: CFI/MSGS ---- QUIT^M with a test case as follows: HELO tester MAIL From:test-from@delegate.org RCPT To:test-to DATA Content-Type: text/plain Subject: test From: test-from To: test-to testing . -- Yutaka |2010/4/29 Yutaka Sato <feedback@delegate.org> | |> Hi, |> |> In message <_A4796@delegate-en.ML_> |> on 04/29/10(18:40:50) |> you Garbage Mail <pxqjabdyi-efh3miqjke66.ml@delegate.org> wrote: |> |One of my choice is to clean out the body of the content (or rewrite it). |> |I've planned to use the SMTPGATE directive but I realise that I cant find |> |something to do it in the manual. |> | |> |So I will be glad if someone have an anwser to these questions : |> | |> | - Is it possible to manipulate the body with delegate ? |> |> You can filter message data over SMTP (and other protocols) using |> "CFI script" with external filter probgrams. For example, the following |> example will add line number for each line in a message body. |> |> FTOSV=smtp.cfi |> |> [the content of DGROOT/etc/smtp.cfi] |> #!cfi |> Body-Filter: /bin/cat -n |> |> |> | - Emptying or rewriting the body will remove the attached docs ? |> |> You can do any rewriting by yourself. |> |> Cheers, |> Yutaka |> -- |> 9 9 Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/ |> ( ~ ) National Institute of Advanced Industrial Science and Technology |> _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan |> Do the more with the less -- B. Fuller Cheers, Yutaka -- 9 9 Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/ ( ~ ) National Institute of Advanced Industrial Science and Technology _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan Do the more with the less -- B. Fuller