Find the answer to your Linux question:
Results 1 to 2 of 2
Basically, I'm worried that a spammer is targeting one of our mail accounts and I would like a way to check the maillog for which email accounts are receiving the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    3

    Looking for a script to group grep results for my maillog


    Basically, I'm worried that a spammer is targeting one of our mail accounts and I would like a way to check the maillog for which email accounts are receiving the most recent mail.

    I can do:

    grep -c "sample@somesite.com" /var/log/maillog

    Which works great for that email account, but unfortinitly I have 1000's of email accounts, and I don't have the time to do this for every account, and then find which account was receiving the most email.

    Is there a way use something like grep -c, that will allow me to group results by email address sorted by which email account in /var/log/maillog is receiving the most emails?

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Could you post a few lines from that log (including lines that contain the email address as you've described)?

    I have some ideas but need to see how the file is laid out first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •