homepage Welcome to WebmasterWorld Guest from 54.167.179.48
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Looking for a script to group grep results
smithaa02

5+ Year Member



 
Msg#: 3141482 posted 8:39 pm on Oct 31, 2006 (gmt 0)

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?

 

lizardx

10+ Year Member



 
Msg#: 3141482 posted 9:15 pm on Nov 2, 2006 (gmt 0)

post a few examplified sample lines of the log file, it's fairly easy to do that, I'm just not familiar with the format.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved