Re: mail queue issues -- backed up with spam messages

This is a discussion on Re: mail queue issues -- backed up with spam messages within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Sat, Oct 16, 2004 at 08:01:10PM -0400, Wietse Venema wrote: > Craig Sanders: > > On Sat, ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2004
Craig Sanders
 
Posts: n/a
Default Re: mail queue issues -- backed up with spam messages

On Sat, Oct 16, 2004 at 08:01:10PM -0400, Wietse Venema wrote:
> Craig Sanders:
> > On Sat, Oct 16, 2004 at 12:17:27PM -0400, Wietse Venema wrote:
> > > I suggest that you search the maillog file for all records that
> > > list the IP address while the bad customer was using it. That
> > > gives you the queue ID strings and the random sender addresses.
> > >
> > > grep '[111\.222\.333\.444\]' /var/log/maillog >11.22.33.4-records
> > >
> > > edit the file, and delete records outside the window of interest
> > >
> > > postsuper -h - <11.22.33.4-records

> >
> > you can avoid having to manually edit the file with a one-liner like this:
> >
> > grep "client=.*\[111\.222\.333\.444\]" /var/log/mail.log | \
> > awk '{print $6}' | \
> > sed -e 's/://' | \
> > postsuper -d -
> >
> > (or "postsuper -h -" to hold the messages rather than delete them)

>
> The one-liner does not delete the logfile records outside the time
> window of interest.


sorry, i can't parse that.

if you mean that logfiles are rotated and there may be more queue entries than
in the single log file grepped, then that's obvious. if the spam run crosses
a log-rotation period, then run the one-liner on multiple log files. mail.log,
mail.log.0, mail.log.1.gz or whatever.

the one-liner deletes (or holds) all messages from a specific IP address that
it can find in the mail log file. nothing more, nothing less. if you know for
certain that ONLY the spammer has used that IP in the time period, then
"postsuper -d -" is safe. if not, then "postsuper -h -" is the best to use,
then unhold the "good" messages and delete the rest.


craig

ps: it would be useful if postsuper could accept queue-ids with an optional
final ":" character. that would avoid having to call sed to strip it off
when grepping mail logs.

--
craig sanders <cas@taz.net.au>

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:44 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0