procmail
[Top] [All Lists]

Ruud's "bq-decoding recipes v1.00" (was. Charset ISO-8859-1 and ASCII Subjects - Part II)

2004-03-28 06:03:51
On Sat, 13 Mar 2004, 20:18 GMT+01 Ruud H.G. van Tol wrote:

To run any of the Test.rcs, just download the files to somewehere

   wget -r -A rc,inc -nH --cut-dirs=2
http://www.xs4all.nl/~rvtol/procmail/bq

and run it like this:

   procmail ./bq_Test.rc  < /dev/null


Someone any ideas for usage or extensions?

I have now taken a closer look into your bq-decoding recipes and I must
say they are working great! Therefore, I have added its core code to
my latest SoftlabsAV Package - version 0.6.5 (summer time edition)
which has been released today. It is available at

http://softlabsav.sourceforge.net/

This version also catches attachments with "B" or "Q" encoded text in
their file names. Your routines are used to decode such encoded-text
(as defined in RFC 2047 - "MIME Part Three: Message Header Extensions
for Non-ASCII Text") with pure-procmail code, eliminating the need of
an extra call to mimencode.

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"

Ruud's bq-decoding code, plugged through the include file 'av_bq.inc'
to SoftlabsAV, then returns:

procmail: Assigning "bq_Return=Första bild.ppt.e"

I am then restoring the attachment's decoded file name:

procmail: Assigning "av_FILENAME_CLEARTEXT=xe"
procmail: Assigning "av_FILENAME=Första bild.ppt.exe"

:-)

Here is the full ChangeLog:

____________________________________________________________________________
 v0.6.5         (2004 03 28) (summer time edition)

 + a bad attachment will now also be catched if its filename (or its 
   beginning part) has been Base64 ("B") or Quoted-Printable ("Q") encoded, 
   using the standard defined in RFC 2047. 

 + a bad attachment's filename will be restored properly (unencoded) if 
   its beginning part has been "B" or "Q" encoded during the transmission. 

 + the core of Ruud H.G. van Tol's "bq-decoding recipes v1.00" has been 
   added (as 'av_bq.inc' routine with its sub routines 'av_b64.inc' and 
   'av_qpr.inc'). We are using it to decode "B" or "Q" encoded filenames with 
   pure-procmail code (without the need of calling mimencode). 
   Thanks a lot to Ruud H.G. van Tol! 

 + mimencode now no longer may write (harmless) 
   "base64 decoder saw premature EOF!" warnings into the log file. 

 + the cases have been eliminated where *not* setting TEST in the 
   '/etc/procmailrc' file may not have worked as expected. 


rob.




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


<Prev in Thread] Current Thread [Next in Thread>