A bad change in sendmail has generated mailbox files instead of writing emails in maildir. We have roll-backed the change and emails are now well delivered in mailboxes. But, emails in mailbox files remain, and I am looking for a way to requeue those emails, so that they can be deliver into maildir.
How to requeue a mbox file with sendmail
335 Views Asked by Roger Yerbanga At
2
There are 2 best solutions below
0

Another solution is described there : http://giantdorks.org/alain/resend-mail-thats-locally-stored-in-a-mbox-format-on-a-linux-box-to-a-working-email-address/
It uses formail to detach emails and sendmail to resend them.
Finally, I used mb2md (http://manpages.ubuntu.com/manpages/eoan/en/man1/mb2md.1.html) to convert all those mailboxes to maildirs, then copied different emails inside new created maildirs to respective users maildirs.
Script looks like this code :