mailman_mimedefang_fix_footer - mimedefang filter code for moving a mailman footer from a separate attachment into the text and HTML body parts of the message.
GNU Mailman http://list.org/ is the most popular free software package for managing electronic mailing lists. While it is quite good at what it does, there is one functional deficiency that people stumble over frequently: it doesn't handle message footers well for multipart MIME messages.
Nowadays, most mail programs generate email messages containing both text and HTML versions of their content. When a Mailman list is configured to append a footer to outgoing messages and it encounters a message with both text and HTML content versions, it adds the footer as a separate section of the message entirely. Some mail programs display the resulting footer properly, but others do not, with the result that users may not see the footer as desired by the list administrators. This problem is discussed in the Mailman FAQ at http://wiki.list.org/pages/viewpage.action?pageId=4030707, which essentially says that the maintainers of Mailman consider this problem to be unsolveable.
Not everyone is convinced, and some of the dissenters have put their money where their mouth is. For example, see http://mail.python.org/pipermail/mailman-developers/2005-February/017850.html, which describes enhancements to Mailman implemented at one site to allow separate text and HTML headers to be configured and appended directly to the text and HTML content versions of outgoing messages. Unfortunately, the maintainers of Mailman rejected these enhancements, and they are obsolete, i.e., incompatible with the current stable version of Mailman.
Others have pointed out that the popular mimedefang http://mimedefang.org/ free software package also knows how to add footers to text and HTML message parts, so if mimedefang can do it, then Mailman should be able to as well.
It is also frequently mentioned that mimedefang can be used in conjunction with Mailman to implement a workaround for this problem, but it is not straightforward, and it seems like no one who mentions this solution ever explains exactly how to do it. Until now, that is... This script can be used to embed Mailman message footers directly in the text and HTML content versions of your outgoing messages. It does not require any code changes to Mailman; it can used with standard versions of Mailman and mimedefang. Read on to find out exactly how.
Usage is simple:
That's it! The footers generated by Mailman for outgoing messages to the lists you've reconfigured will now be detected by mimedefang and moved into the text and HTML body parts of the messages.
If you want the text version of the footer to be word-wrapped automatically, put a space and then "WRAP" on the first line of the footer, after "MAILMAN_MIMEDEFANG".
If you want the HTML version of the footer to be displayed in a fixed-width font, put a space and then "FIXED_WIDTH" on the first line of the footer, after "MAILMAN_MIMEDEFANG".
You can do "MAILMAN_MIMEDEFANG WRAP FIXED_WIDTH" to get both of these features.
Copyright (c) 2010-2011 Jonathan Kamens.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
I love to hear from people who are using my software, so please email me <firstname.lastname@example.org> and let me know! Please also email me if you have any questions, suggestions, bug reports, fixes or enhancements to share.
This is version $Revision: 1.16 $ of this script. The current version can always be downloaded from http://stuff.mit.edu/~jik/software/mailman_mimedefang/mailman_mimedefang_fix_footer.pl.txt. This Documentation is available on-line at http://stuff.mit.edu/~jik/software/mailman_mimedefang/.