If you own a NRG/Rex-Rotary/Aficio/Ricoh/Gestetner MP 161 Fax/Scan/Print combination you might have noticed the annoying habit of that device to chop E-Mail messages of scanned Images into multiple parts. This is implemented by using MIME message/partial Semantics.
While there are obscure mail applications which are able to read message/partial modern software ignores it, because it is a huge security issue.
This in turn means, I can’t open longer documents mailed by the MP 161 to me.
Because I like to scan large documents, I hate this quirk of the MP 161. So I wrote a Python tool called departicularifier which connects to an IMAP server, downloads the mails send by the fax, reassembles and decodes the messages and dumps the files on your harddisk.
$ python departicularifier.py --help Usage: departicularifier.py --firstname.lastname@example.org [options]. Try departicularifier.py --help for details. Extract files from message/partial MIME messages generated by NRG MP 161 scanfax appliances. Options: --version show program's version number and exit -h, --help show this help message and exit --server=SERVER hostname of the IMAPS server where the messages are stored (default: "mail.hudora.biz") --user=USER User name for logging into the server (default: "none") --password=PASSWORD Pasword used to login (default: ask for password) --folder=FOLDER Folder to scann for messages (default: "INBOX") --sender=SENDER Sender whose messages to process (default: "scanner@") --dir=DIR Destination directory (default: ".")
For you it need probably some fiddeling with the parameters. A run shoul look like this:
$ python decoder.py --email@example.com connecting to 'mail.hudora.biz' as 'firstname.lastname@example.org'. Password: [long wait] writing ./20080528132721094.pdf writing ./20080528130042306.pdf writing ./20080528131755217.pdf
You can download departicularifier.py here.