[Techtalk] Mbox command line exploration
Monique Y. Mudama
monique at bounceswoosh.org
Thu Jun 30 14:00:09 UTC 2011
On Thu, Jun 30 at 11:41, tauscher at abwesend.de penned:
> Hi Linuxchix,
>
> I've got a Java application processing bounced mail. Since Dovecot
> wasn't running for a while, incoming bounces have piled up. Now the
> application throws errors during processing. I don't know under
> which conditions mail processing was interrupted and therefor don't
> know whether the mailbox is corrupted or there is some special case
> in a certain mail. Before setting up a debugging scenario with that
> data, I'd like to inspect the mailbox from the command line.
>
> Probably this is simple to answer, but I just don't know where to
> start, cause I'm not familiar with command line mailbox handling.
> Maybe somebody can give an overview?
You should be able to view any mbox file in a mail editor like mutt or
pine. There's also a search tool called grepmail that might be
helpful - I think it defaults to MailDir, but you can tell it to use
mbox instead.
mbox is a very simple plain text file format, so ultimately you can
just dig in with your favorite editor (vim, emacs, gedit ...) and poke
around.
If the mails are actually stored in maildir, you should still be able
to read them in mutt or pine (with slight tweaks to the config file
and/or how you open it), grepmail will still work, and each message is
stored as a separate file in a directory, but I'm not as familiar with
troubleshooting - and with MailDir I suspect it's possible for the
directory structure to get out of sync in a way that your Java app
might not handle.
--
monique
More information about the Techtalk
mailing list