Skip to main content

Postfix log parser to follow a mail address.

Project description

followmail

followmail is a command line utility that parse a postfix log file (also gzipped) and follow pathway of specific mail, in to or from fields.

Installation

To install followmail, follow this:

# With pypi
pip install followmail

# With git
git clone https://github.com/MatteoGuadrini/followmail.git && cd followmail
pip install .

Command arguments

followmail have many command line arguments. They are explained in this table:

short long description args
-v --verbose Print with verbosity
-t --to Email address into to field Mail address
-f --from Email address into from field Mail address
-l --maillog Input maillog file File path
-q --queue Name of postfix queue Name of queue
-m --max-lines Max lines to print Number
-D --sortby-date Sort lines by date
-c --csv Print in csv format
-j --json Print in json format

Examples

  1. Search into to field the email other@example.com:

    followmail -t other@example.com
    
  2. Search into from field the email other@example.com:

    followmail -f other@example.com
    
  3. Search both from and to fields:

    followmail -f other@example.com -t other2@example.com
    
  4. Filter per queue

     followmail -f other@example.com -t other2@example.com -q "postfix/in"
    
  5. Select archived log

     followmail -f other@example.com -t other2@example.com -l "/var/log/maillog-20240709.tar.gz"
    
  6. Select archived log

     followmail -f other@example.com -t other2@example.com -m 20
    
  7. Sort results by date

     followmail -f other@example.com -t other2@example.com -D
    
  8. Print result in CSV format

     followmail -f other@example.com -t other2@example.com -c
    
  9. Print result in JSON format

     followmail -f other@example.com -t other2@example.com -j
    
  10. Debugging

     followmail -f other@example.com -t other2@example.com -v
    

Open source

followmail is an open source project. Any contribute, It's welcome.

A great thanks.

For donations, press this

For me

paypal

For Telethon

The Telethon Foundation is a non-profit organization recognized by the Ministry of University and Scientific and Technological Research. They were born in 1990 to respond to the appeal of patients suffering from rare diseases. Come today, we are organized to dare to listen to them and answers, every day of the year.

Adopt the future

Treeware

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

Treeware

Acknowledgments

Thanks to Mark Lutz for writing the Learning Python and Programming Python books that make up my python foundation.

Thanks to Kenneth Reitz and Tanya Schlusser for writing the The Hitchhiker’s Guide to Python books.

Thanks to Dane Hillard for writing the Practices of the Python Pro books.

Special thanks go to my wife, who understood the hours of absence for this development. Thanks to my children, for the daily inspiration they give me and to make me realize, that life must be simple.

Thanks, Python!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

followmail-1.0.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

followmail-1.0.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file followmail-1.0.0.tar.gz.

File metadata

  • Download URL: followmail-1.0.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for followmail-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6c39f53b1fc269ccfb7b559387afb5f154bd7473e35bb0b26290143aff111d2a
MD5 e1c66cf6f7cf470744374649e544e54a
BLAKE2b-256 c24235d10a1fc64b4c90694adedad8fec0f37b5aee6b68710aeecad68c181756

See more details on using hashes here.

File details

Details for the file followmail-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: followmail-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for followmail-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df9789f835c7cbe977dacfbc5174c0e75b9ed9df0076ca1fc4352f239028758d
MD5 30b229f29a2e1b844d628821434211d4
BLAKE2b-256 3dde474406f9d15058d80901945053b7c9281c7619d65ffd56984a279234098b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page