Improving urlize behaviour
Alfonso Marín Marín <almarin@...
2011-05-31 08:48:01 GMT
We have activated 'urlize' reception mode in some heavy internal lists
to save space in users mailboxes. It is working fine, but we have
noticed a behaviour that can be improved, from our point of view.
When an user with a graphic signature send a message with an attached
file, or an user send a message with embedded images and an attached
file, sympa 'urlize' the file but also it 'urlize' the html part. That
occurs because the mail client creates the html message inside a
"multipart/related" MIME part and this part is greater than
An obvious solution could be to increase 'urlize_min_size', but then
there is the risk of passing some attachments 'un-urlized', loosing the
adventages of 'urlize' reception mode.
We think that a better solution would be to 'urlize' the parts inside
the 'multipart/*' part, instead of the whole part itself.
I propose a patch to do this. Inside List::_urlize_part, if the part
hasn't got a recommended_filename, and the part is 'multipart/*', we
pass this part throw List::_urlize_part again.
I would appreciate your point of view, because I don't know if I'm
missing something or this is not a good idea for any reason.