[Mimedefang] Patch to Add Spamd Support

Jason Englander jason at englanders.cc
Tue Jun 17 15:42:01 EDT 2003


On Tue, 17 Jun 2003, David F. Skoll wrote:

> If people think the spamc/spamd patch is worth including, I'll add it.
> However, I find it a bit inelegant to have two ways of doing the same
> thing, especially when (according to one of your earlier posts) it's
> difficult to get both the list of tests and the spam report out of
> spamd.

I could certainly be wrong, but you may be thinking about an off list
message I sent to you last month about this patch:

http://englanders.cc/pub/linux/patches/mimedefang-2.33-spamd.patch

(be gentle with the URL, it's cable, and it's been going up and down lately)

If you do go with something for spamd, feel free to suck anything good out
of there, if there is anything...

I'm not using spamd any more.  After about a week with it, I found
spam_assassin_* to be lots faster in almost every case, and I can do
everything with those that I wanted to do with my own spamd_* functions
(per user configuration, bayes, and awl), so I scrapped it.

I got AWL to work by setting $SAUseAWL to 1 in my filter and doing
this to mimedefang.pl:


--- mimedefang.pl	2003-06-17 15:34:12.000000000 -0400
+++ /usr/local/bin/mimedefang.pl	2003-06-17 14:53:24.000000000 -0400
@@ -39,7 +39,7 @@
 	    $CWD $FprotdHost
 	    $NotifySenderSubject $NotifyAdministratorSubject
 	    $ValidateIPHeader
-	    $QuarantineSubject $SALocalTestsOnly $NotifyNoPreamble
+	    $QuarantineSubject $SALocalTestsOnly $SAUseAWL $NotifyNoPreamble
 	    %Actions %Stupidity @FlatParts @Recipients @Warnings %Features
 	    $SyslogFacility $GraphDefangSyslogFacility
 	    $MaxMIMEParts $InMessageContext $PrivateMyHostName
@@ -4028,6 +4028,7 @@
     $DaemonName = 'MIMEDefang' unless defined($DaemonName);
     $DaemonAddress = 'mailer-daemon at localhost' unless defined($DaemonAddress);
     $SALocalTestsOnly = 1 unless defined($SALocalTestsOnly);
+    $SAUseAWL = 0 unless defined($SAUseAWL);

     if (!defined($GeneralWarning)) {
 	$GeneralWarning =
@@ -5107,6 +5108,13 @@
 	    local_tests_only   => $SALocalTestsOnly,
 	    dont_copy_prefs    => 1,
 	    userprefs_filename => $config});
+
+        if (defined($SAUseAWL) && $SAUseAWL == 1) {
+          use Mail::SpamAssassin::DBBasedAddrList;
+          my $addrlistfactory = Mail::SpamAssassin::DBBasedAddrList->new();
+          $SASpamTester->set_persistent_address_list_factory ($addrlistfactory);
+        }
+
     }

     return $SASpamTester;



  Jason

-- 
Jason Englander <jason at englanders.cc>
394F 7E02 C105 7268 777A  3F5A 0AC0 C618 0675 80CA




More information about the MIMEDefang mailing list