procmail
[Top] [All Lists]

Re: Ruud's "bq-decoding recipes v1.00"

2004-03-28 08:02:37
Toen ik Robert Allerstorfer kietelde, kwam er dit uit:

I have now taken a closer look into your bq-decoding recipes and I must
say they are working great! [...]
Viruses have been sent to me with a filename 'Första bild.ppt.exe' -
including spaces and characters > 127. Such a file name will now also
be recognized if it is "hidden" like this in the message:

Content-Type: application/octet-stream;
name="=?ISO-8859-15?B?RvZyc3RhIGJpbGQucHB0LmU=?=xe"
[...]
procmail: Assigning "av_FILENAME=Första bild.ppt.exe"


When you combine bq (bq = base64/quoted-printable decoding) and
snr (snr= search'n'replace) you can now do this (see bq_Test.rc)

  bq_Input = "Content-Type: application/octet-stream; \
name=\"=?ISO-8859-15?B?RvZyc3RhIGJpbGQucHB0LmU=?=xe\""

  LOG       = "${NL}bq_Input($bq_Input)$NL"

  INCLUDERC = ${rcdir}bq.inc
  LOG       = "${NL}bq_Return($bq_Return)$NL"

  snr_String  = $bq_Input
  snr_Search  = $bq_Encoded
  snr_Replace = $bq_Return

  INCLUDERC   = ${rcdir}snr_fast.inc
  LOG         = "${NL}snr_Return($snr_Return)$NL"

This version (1.01) does not handle input with multiple encoded
parts yet, the next version (1.10) will. The *_Test.rc files will
be called *_Demo.rc then.

-- 
Affijn, Ruud


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail