Skip to content

Polytechnique-org/mailparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2f7212e · Mar 25, 2021

History

21 Commits
Mar 25, 2021
Mar 22, 2021
Mar 25, 2021
Mar 25, 2021
Mar 25, 2021
Mar 25, 2021
Mar 25, 2021
Mar 25, 2021
Mar 22, 2021
Mar 25, 2021
Mar 23, 2021

Repository files navigation

mailparse

Mailparse is an utility to parse postfix log files and display the path of a given message in an easy-to-use manner.

Usage

Search for a message ID in a given log file:

$ mailparse [message-id] /var/log/prod/mail/mail.log

Search for a message-ID across multiple log files:

$ mailparse [message-id] /var/log/prod/mail/mail-*.log

Search for a message-ID across a few days (also works with gzipped log files):

$ mailparse [message-id] /var/log/prod/mail/mail-2021-03-{24,25}*

Search for a message-ID across all uncompressed mail-related log files (warning: this is usually slow):

$ mailparse [message-id]

Deployment

mailparse can simply be build with cargo build --release and then used from target/release/mailparse.

Unfortunately, current debian's rustc is too old for that, and it means that we have to build it another way.

The recommended way is to build a musl-static version of mailparse on a machine that has nix installed, by running ./build-static.sh from the root of the repository. This generates a result/bin/mailparse file, that can then be copied to the relevant server and used from there. Be aware that the first time you run it build-static.sh will build a musl-ready rustc, so this will take some time and require some memory.

Hopefully this will no longer be required after a few upgrade cycles. For now, a compiled version of the program is available at /home/x2014gaspard/mailparse

About

A tool that helps exploring postfix log files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published