Are there any programs for extracting, but not deleting, attachments in a mailbox?
I found Attachment Extractorthat runs in Thunderbird on Windows. Author does not know whether it would also work in Linux.
However, I would prefer an extractor that can work outside of the email program, i.e., just parse a particular mailbox file.
Such a program would likely work with the file format used by at least Thunderbird and Eudora, and, I guess, other sendmail compatible formats.
You could write your own BASH script to do the same thing.
Have a look at:
BASH Programming - Introduction HOW-TO
When your got it all running, contribute it back to the Linux Community.