[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Re: Rejecting emails based on DNS
- Subject: [cobalt-users] Re: Rejecting emails based on DNS
- From: Bruce Timberlake <bruce@xxxxxxxxxx>
- Date: Tue Mar 23 07:01:24 2004
- Organization: BRTNet.org
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
On Tuesday 23 March 2004 04:56 am, Dan Kriwitsky wrote:
> > How do I check how many emails I'm
> > rejecting using the DNS-spam blocking addresses?
> > Is any log that I need to see? (I checked
>
> If your rejection message contains "spamhaus" you can do:
>
> grep spamhaus /var/log/maillog and you will see a list of those
> rejected. If you have a common word in your rejections by DNSBL you can
> grep for that. IIRC, there are ways to just get a count of them but I
> haven't looked for the syntax.
Using the above example, just pipe it through wc (word count):
grep spamhaus /var/log/maillog | wc -l
and that will tell you how many lines contain that string. To check all of
them at once, you can use a regex and do something like:
grep [spamhaus|dnsbl|foo|bar] /var/log/maillog | wc -l
and that will give you the total of all rejected messages (assuming you put
all your DNSBL names in the [...] above. It won't tell you how many are being
blocked by each one though.