Created
September 11, 2015 09:24
-
-
Save nakal/87195dd29f25bccffb05 to your computer and use it in GitHub Desktop.
Split a single MBOX into many small email files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generates mails 1.eml, 2.eml,... from a single mbox file | |
# when (e.g.) procmailrc is flawed and everything was delivered | |
# locally | |
# | |
# then you can feed these files into the LDA one-by-one | |
awk '/^From / {nr += 1; getline }; { print $0 >> ( nr".eml" ) }' /var/mail/$USER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment