[Mimedefang] Re: Accept mail before processing

Yizhar Hurwitz yizhar at mail.com
Wed Mar 15 16:20:51 EST 2006


As some have already suggested to you, I did the following on my small 
MD server to improve performance of outgoing mail:

1. I have disabled antispam checking for outgoing mail, using the 
It is up to you to decide if you want to skip spamassassin check for 
outgoing mail or not, and if so, which method or rules to use for that.

sub filter_end ($) {
   my($entity) = @_;

   # No sense doing any extra work
   return if message_rejected();

   # Spam checks if SpamAssassin is installed
   if ($Features{"SpamAssassin"}) {
     if ($RelayAddr =~ "^192\.168\.1"
       or $RelayAddr eq "") {
     # note: You can add here logging or other commands to note that 
SpamAssassin was skipped...
     } else {
       if (-s "./INPUTMSG" < 100*1024) {
           # Only scan messages smaller than 100kB.  Larger messages
           # are extremely unlikely to be spam, and SpamAssassin is
           # dreadfully slow on very large messages.
           my($hits, $req, $names, $report) = spam_assassin_check();

2. It would be a good idea to follow the performance tuning steps to 
improve MD performance in general for any mail traffic.
One major step is to put /var/spool/MIMEDefang on a RAM drive.
Read here:
Creating a RAM-based spool directory - MIMEDefang:
And here (page 142):

Good luck,

Yizhar Hurwitz

More information about the MIMEDefang mailing list