[Mimedefang] mimedefang, spamassassin, multiple domains

Rajesh Bhandari BhandaR at mail.nlm.nih.gov
Fri Oct 25 12:31:01 EDT 2002


Dan Tulovsky wrote:
>> I am asking because I want to implement different rules based on different
>> domains.  The man page for mimedefang-filter says I can call the
>> spamassassin functions with an argument that is the configuration file name.
>> So I plan to have a spamassassin configuration file for each domain and call
>> the spam_assassin_check([ $config_file ]) function depending on what domain
>> I am working with.

And David replied
>This will not work, because MIMEDefang creates a persistent SpamAssassin
>object.  So you can't change config files from one message to the next.

To me, such functionality (using different SA rules for each domain) is very desirable, specially on mail hubs..  What about spam_assassin_init?
-----
spam_assassin_init([ $config_file ])
              This function returns the new global Mail::SpamAssassin object with the specified or default  config  (outlined  above).   If  the  global  object is already defined, returns it -- does not change config files!  The object can be used to perform other SpamAssassin related functions.
------
Could one delete the global Mail::SpamAssassin object and then create a new Mail::SpamAssassin global object with this function call?  Is this possible? Is it recommended? Are there internal MD architecture issues?

Rajesh






More information about the MIMEDefang mailing list