Patrick,
I threw this onto one of my servers to test, and it was working ok. I went ahead and threw in onto 3 large production servers. So far no issues. I'll follow up if I get some crashs or something.
Thanks. Works fine here as well. Did compare timings over a couple of hours, and a typical time for checking a single simple mail part (which is quite common) dropped from 27 ms down to 4 ms. With more mail parts (or more demanding files) the obvious advantage diminishes, but is still favourable towards calling libmagic directly. Mark
