[Mimedefang] Filtering Local Submission

Stefano McGhee SMcGhee at ARCweb.com
Thu Feb 20 09:00:01 EST 2003


Hello All,
	I've come upon an issue in my MD implementation that I was hoping
to get help with.  My machine functions as an external relay, acting as an
"email firewall" before relaying mail inbound to me Exchange box.  I
currently also use stream_by_recipient in filter_begin to do better per
person filtering by SA.  I have a snippet of code like this in my
filter_relay:

    if ($helo =~ /mydomain\.com/i) {
        if ($hostip eq "127.0.0.1" or $hostip =~ /^XXX\.XXX\.XXX\./)
                {
                return ('ACCEPT_AND_NO_MORE_FILTERING', "OK");
        }else{
            md_log('impersonation', 'Impersonation, host $hostip said HELO
$helo'$
            return ('REJECT', "Go away. You're not me. I'm me.");
        }
    }
    return ('CONTINUE', "OK");

The ips and domain has been changed to protect the innocent.  The XXX's
represent a class C address range that my network resides on.  What's
happening, is that my streamed messages are not being filtered.  I imagine
that's because of the second if statement that ends in
ACCEPT_AND_NO_MORE_FILTERING.  This was originally done to accept mail from
my local network for relaying.  However, I also redirect mail to a local
spam mailbox if the SA score falls between 10 and 13.  If it's OK I bounce
the mail on to the recipient using pine.  I see a problem having MD not
filtering mail that I want to bounce (forward to recipient), but continue
to filter mail that is streamed.  Since the streamed mail is resubmitted
locally, it seems to fall into the same basket as the mail I bounce
(forward to end recipient).  Can I get around this?  Hopefully my ranting
made sense...:-)

Cheers,

Stefano




More information about the MIMEDefang mailing list