Solved

Help with Spamassassin and Procmail (message size)

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

809 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