On 6/12/19 1:46 AM, Henrik Rasmussen wrote:
The difference was that list(m.pass_types) is []
Now, setting
m.pass_types = ['multipart', 'message/rfc822', 'text/plain', 'text/html', 'application/pdf', 'application/nappdf', 'application/x-pdf', 'application/rtf', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', 'application/vnd.oasis.opendocument.text', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/msword']
on the new testlist and resending the mail again, the mail still came out intact.
So I guess the problem must be something complete different.
Also I wonder why a newly created list accepts the PDF in question, when list(m.pass_types) is [].
You need to look at all of pass_types, filter_types, pass_extensions and filter_extensions for both lists.
For a newly created list, these are all empty. They work as in Mailmam
2.1 and are imported from the similarly named 2.1 attributes by mailman import21
.
In brief if filter_content is True, processing is:
- If a part's MIME type is in filter_types it is removed.
- If pass_types is not empty and a part's MIME type is not in pass_types it is removed.
- If a part has a file name and the file name extension is in filter_extensions it is removed.
- If a part has a file name and pass_extensions is not empty and the part's file name extension is not in pass_extensions it is removed.
So in your case of the list that doesn't work, possibilities are:
- The PDF part's MIME type is in filter_types, or
- The PDF part has a file name whose extension is in filter_extensions, or
- pass_extensions is non-empty and The PDF part has a file name whose extension is not in pass_extensions.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan