Batch convert Outlook MSG to EML or MBOX #

with Matijs van Zuijlen's open source MSGConvert (aka Email::Outlook::Message).

Install:

sudo apt install libemail-outlook-message-perl

Recursively convert MSG files to EML files, saving in their respective directories:

find /path/to/msgs/ -iname "*.msg" -type f -print0 | xargs -0 -I{} bash -c 'msgconvert "{}" -o "$(dirname "{}")/$(basename "{}" .msg).eml"'

Recursively convert and combine MSG files into a single MBOX file:

find /path/to/msgs/ -iname "*.msg" -type f -print0 | xargs -0 msgconvert --mbox combined.mbox

Notes

/nix | May 24, 2024


Subscribe or visit the archives.