My e-mail full text search software mailpie is now hosted at github: https://github.com/jepler/mailpie
In her professional life, my fiancée routinely gets emails with attachments in the 'winmail.dat' aka application/ms-tnef format. It does her no good to berate these prisoners of proprietary software, so I set out to provide her with an easy-to-use solution that would work on her end. Now, prompted by this blog entry I am posting it for others to use.
There are a number of programs that can rescue data from this proprietary attachment format, but I was not aware of a program that would automatically convert the winmail.dat attachment to (a series of) regular mime attachments. (it appears that ytnef_smtpd may be such a program)
So I wrote one, tnef2mime.py. tnef2mime reads a message on standard input, combs it for ms-tnef attachments, and uses the tnef(1) program to extract their contents. Then it takes the extracted files, adds them as new MIME parts, and prints the whole resulting message.
This is suitable for use in e.g. procmail:
:0fw | tnef2mime
Several steps are taken in order to minimize the chances for data loss: Just in case it did an imperfect job, it leaves the existing ms-tnef attachment intact. If any problem is encountered, the unmodified message is written.
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.
Files currently attached to this page:
I love this little program and now I don't know how I lived without it.
Aside from bugs fixed, the main improvement is a double-level indexing scheme that makes it fast to add messages just one or a few at a time.
mailpie is a suite of programs for commandline full-text search of large e-mail archives.
All older entries
Website Copyright © 2004-2018 Jeff Epler