Analysis tool for Postfix log in /var/log/maillog
Project description
maillogger
Analysis tool for Postfix log in /var/log/maillog
Feature
- Load maillog file
- Identify text or gzip automatically
- Parse maillog
- Use regex
- Convert to Python dictionary
- Output the parsed maillog to files
- Supported data format is CSV, TSV and JSON
- Compression (gzip) is possible
Installation
pip install maillogger
Usage
usage: maillogger [-h] [-f {csv,tsv,json}] [-c] [-V] source_file target_file
Analysis tool for Postfix log in /var/log/maillog
positional arguments:
source_file Specify Postfix maillog file
target_file Specify the filename to write parsed maillog. The file
extension is automatically added to the end of
filename.
optional arguments:
-h, --help show this help message and exit
-f {csv,tsv,json}, --format {csv,tsv,json}
File data format to write the parsed maillog (Default:
csv)
-c, --compress Compress the output file with gzip
-V, --version Show maillogger command version
Examples
Output a CSV file
maillogger /var/log/maillog result
or
maillogger /var/log/maillog result -f csv
Then, result.csv
is generated in current working directory.
Output a JSON file
maillogger /var/log/maillog result -f json
Output a TSV file
maillogger /var/log/maillog result -f tsv
Output a compressed CSV file
maillogger /var/log/maillog result -f csv -c
Then, result.csv.gz
is generated in current working directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
maillogger-0.1.0.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for maillogger-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd2913c9412e88a608449fdb592eafd542758801f3aaa35d462fffde318fbab |
|
MD5 | 3073d3b043be5e23fd0e37e0f87b9a10 |
|
BLAKE2b-256 | e65c4aa359a085d3e758003118bda45241057bb0e055888e26d5a4de605a41e6 |