Solved

Help with Spamassassin and Procmail (message size)

Posted on 2003-11-09
2
438 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

840 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