Richard and John, thanks for your submissions, I also found a way to do it directly to 
the Scrubber.py file:

change the line:
  filebase, ignore = os.path.splitext(filename)
to:
  filebase, ext = os.path.splitext(filename)

seems to have done the trick. Bascially just uses the extension of the file, no matter 
what the mapping found.
Granted, I would never do something like this on a publicly accessible list serve!  
I will look over both your recommendations as well, they look pretty solid as well.

Thanks!


>>>
>
>>>> I am trying to figure out how to resolve PDF's being converted into
>
>>>> .obj extensions in the archive (they get sent to list subscribers
>
>>>> still in .pdf
>
>>>> form).

>>>>
>
>>>> Ultimately, I would like the .obj to just be .PDF so end-users do not
>
>>>> get the 'open with' dialog box.
>

>
>>>> Here is a sample archived message:
>
>
>>>> A non-text attachment was scrubbed...
>
>>>> Name: x-4.pdf
>
>>>> Type: application/octet-stream
>
>>>
>
>>> You problem is the MIME type the MUA attaching the PDF file is putting
>
>>> in the Content-type. It appears to be saying it is
>
>>> application/octet-stream rather than application/pdf
>
>>>
>
>>> It is questionable practice to rely on the file suffix to ascribe
>
>>> content type and Mailman does not appear to so do, which is why a file
>
>>> originally called xxx.pdf becomes yyy.obj
>
>>>
>
>>> If the Content-type is corrected I think you will find Mailman 
>
>>> extracts
>
>>> the attachments into .pdf suffixed filenames.
>
>>>
>
>>>> Size: 55233 bytes
>
>>>> Desc: not available
>
>>>> Url :
>
>>>> http://list.domain.com/pipermail/filefax/attachments/20031104/
>
>>>> ea6ccb1e/x-4-0001.obj
>
>>>>
>
>>
>
>> I understand that it is questionable, but there isnt _anything_ I can 
>
>> do on the MUA side, and seeing that it isnt a public list/archive
>
>> that really only gets .pdf files (sent via a fax server) I dont think 
>
>> it is all that dangerous.
>
>>
>
>> I need to figure out how to have the code rely on the extension over 
>
>> the content type.  If anyone has knowledge of modifying the
>
>> Scrubber.py (I think that is where it is) to allow this, please let me 
>
>> know
>
>>
>
>
>
>Attached is a crude little patch that may solve your problem. You can 
>
>apply the patch from  within either the MM build directory and rerun 
>
>./configure and make install, or to the $prefix directory, using the 
>
>following command:
>
>
>
>     patch -p1 < path-to-patchfile
>
>
>
>Particularly if you decide to apply the patch to the MM $prefix 
>
>directory then do first take a backup of 
>
>$prefix/Mailman/Handlers/Scrubber.py in case the patched code doesn't 
>
>work and you need to revert.
>
>
>



---- Prudential Preferred Properties   www.prupref.com  


------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: [EMAIL PROTECTED]
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to