[Mimedefang] Why it isn't working

David F. Skoll dfs at roaringpenguin.com
Fri Oct 18 12:44:00 EDT 2002


On Fri, 18 Oct 2002, Easy wrote:

> What's wrong with this filter:

Many, many things. :-)

> sub filter ($$$$) {
>     my ($sender, $ip, $hostname, $helo) = @_;

filter is not called with those arguments.  Filter is called
with the arguments $entity, $fname, $ext and $type.

>         action_add_header("Bcc", "backup at domain");

This won't actually copy the message to backup at domain.  It just adds a header.

I believe what you want is:

sub filter_begin {
    if ($Sender =~ /^<?mail\@domain>?$/i or
	$Sender =~ /^<?mail2\@domain>?$/i) {
	add_recipient('backup at domain');
    }
}

Regards,

David.




More information about the MIMEDefang mailing list