On Fri, 12 Nov 2004, Richard Whelan wrote:

> Hi,
>
> A couple of weeks back I mailed asking about filter a specific user,
> using either filter_sender of filter_recipient
>
> I ended up opting for the filter_recipient, partly because I already had
> a filter present for this, and also it allows both sender and recipient
> to be checked. However, it's not working.
>
> I have:
>
> sub filter_recipient
> {
>     my($recipient, $sender, $ip, $host, $first, $helo,
>        $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
>
>     if($sender =~ /^<[EMAIL PROTECTED]>?$/i) {
>        if($recipient =~ /^<[EMAIL PROTECTED]>?$/i) {
>           return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");
>        }
>        return ('CONTINUE', "ok");
>     }
> }
>
> However, the senders messages are still being checked and blocked
> because of an attachment within them.
>
> I am having to unquarantine these messages daily at the moment.
>
> Can someone possibly shed some light as to why it's not working.
>
Try adding these lines...

        md_syslog('info',"\$recipient is $recipient");
        md_syslog('info',"\$sender is $sender");

...after your variable assignment line to make sure they have the values
you expect. Also, you need to use -t with mimedefang to enable filter by
recipient because it isn't on by default.

> Cheers,
>
> Richard

Steve Cohen

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to