Solved

Help with Spamassassin and Procmail (message size)

Posted on 2003-11-09
2
435 Views
Last Modified: 2013-12-16
I run a (redhat9) linux box mainly for mail.  Lately with lots of emails with attachments coming through I am finding it grinding to a halt as it spends 10 minutes looking through an email attachment for spam keywords.

All incoming mail goes through SpamAssassin via procmail.

My procmailrc looks like this:

INCLUDERC=/etc/mail/spamassassin/spamassassin-default.rc
LOGFILE=/var/log/procmail

----------------------

My spamassassin-default.rc looks like this:

# send mail through spamassassin
:0fw
| /usr/bin/spamassassin -P

What I would like to do is deliver all emails over 0.5mb in size, regardless of whether they are spam or not, by skipping spamassassin.  Anything less I want to analyse and log.

I know you can create a kind of IF statement in procmail, I just don't know how to do this.

Please help.
0
Comment
Question by:coopa
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
troopern earned 250 total points
ID: 9777009
MailScanner can help you with your problem, and SpamAssassin is configurable to scan up to a certain size of messages if I'm correct.

or scan the messages with
/usr/bin/spamc -s size

see "man spamc" for further Details.
0
 
LVL 7

Expert Comment

by:troopern
ID: 9777011
note that the size is set in bytes.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now