[Mimedefang] Per Domain Configuration

David F. Skoll dfs at roaringpenguin.com
Wed Aug 14 16:23:01 EDT 2002


On Wed, 14 Aug 2002, Robert Covell wrote:

> $AdminAddress and $AdminName do not seem to be reassigned when I move them
> to filter_begin().

Really??  Weird....

MIMEDefang wasn't really designed for this.  I'll have to think about it.

> Confused now.  Is there a better way of routing Spam based on a domain?

You still have to do stream_by_domain.  But then in filter_end, delete
all the original recipients, and then add a new recipient based on the
domain.  Something like:

# Record original recipients -- Bcc: recipients MAY BE REVEALED
action_add_header("X-MD-Original-Recipients", join(", ", @Recipients));

# Nuke original recipients
foreach $orig (@Recipients) {
    delete_recipient($orig);
}

# Add new recipient
if ($Domain eq "dom1.com") {
    add_recipient("spambucket at dom1.com");
} elsif ($Domain eq "dom2.net") {
    add_recipient("sloptray at dom2.net");
} # ... etc.

> So the recipients has
> domain1.com and domain1.com.KAV, causing stream_by_domain to resend the
> message twice.

?? Then KAV is seriously broken.  Don't use it except via MIMEDefang.

Regards,

David.




More information about the MIMEDefang mailing list