[Mimedefang] Multiple Domains

Dan Tulovsky dant at wetsnow.com
Wed Oct 23 13:20:01 EDT 2002


Hi.

I am sorry, please bear with me.  Perl is not something I use everyday.

I am just testing this out.  I created a perl file in the same dir as
mimedefang-filter, called:

spam_wetsnow_com.pl

The file is simply this:

----------------------------
#!/usr/local/bin/perl

sub spam_wetsnow_com() {

        action_change_header("X-Test", "Wetsnow Only!");

}
-----------------------------

In my

sub filter_end($)

I put in:

do spam_wetsnow_com;

after

    my($entity) = @_;

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

Now.  Don't I need to pass the message I am working on to this file?  If so,
how would I do that?  As it stand now, the "X-Test" header is not being
added.

What I want to do, is put almost the entire filter_end routine that checks
for Spam, into these individual files.  The spamassassin routines would then
be called with special config files for each domain as well.

Thank you
Dan


----- Original Message -----
From: "David F. Skoll" <dfs at roaringpenguin.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Thursday, October 17, 2002 8:10 PM
Subject: Re: [Mimedefang] Multiple Domains


> On Thu, 17 Oct 2002, Dan Tulovsky wrote:
>
> > Using that, I would need to have all the domains taken care of in one
file.
> > I was hoping for a config file per domain kind of solution.
>
> So name your files and routines appropriately, and use "do" in Perl.
>
> file "domain1_rules.pl" could contain
>
> sub filter_domain1 () {
> # blah...
> }
>
> Anyway, you get the idea...
>
> --
> David.
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>




More information about the MIMEDefang mailing list