Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reviewing Sendmail smtp log 2

Status
Not open for further replies.

insanenupe

IS-IT--Management
Joined
Jan 30, 2007
Messages
4
Location
US
We had some spamming coming from one of our client machines. When the users hit the firewall the IP is then the same across the board.

Its my understanding the smpt logs would tell me what user is spamming. How do I view the smtp logs?
 
This will allow you to monitor the user in realtime.
Code:
% cd /var/log/
% tail -f maillog | grep [i]<username>[/i]

M. Brooks
 
Mbrooks, thanks for you response. I will try that. But is there a way to view all users? Its does not necessarily have to be in realtime. Thanks in advance
 
That works. thanks. however it only goes back a few days, is there any archieve to view files weeks even months ago.
 
Also note. The files are likely compressed using gzip.

To decompress do:
Code:
% gzip -d [i]<filename>[/i]

M. Brooks
 
One last thing.. If you want to retrieve the log entries from a single user.
Code:
% grep [i]<username>[/i] /var/log/mailog > user_entries.txt

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top