• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

Filter postfix log for sender and recipent

I need to filter the file maillog postfix to look for an email sent from a user someone@externalcompany.com someone@internalcompany.com in the day today.
someone@externalcompany.com send email to 100 people domain@internalcompany.com and I have to find just the one sent to someone@internalcompany.com.
Thanks for the help
1 Solution
Try this:

egrep '(from=<someone@externalcompany.com>|to=<someone@internalcompany.com>)' /var/log/maillog

The above is all one line. :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now