John Rudd wrote:

> I can suggest a solution only if you drop the "with mimedefang" part.

That's fairly radical. :-)  You can do it with MIMEDefang as follows:

sub filter_begin {
    if ($RealRelayAddr ne '127.0.0.1') {
        # Not from localhost... put into clientmqueue and quit
        if (resend_message_specifying_mode('-odd', [EMAIL PROTECTED])) {
            $TerminateAndDiscard = 1;
            return;
        }
        # Doh... could not remail message
        return action_bounce("Doh!! Unable to resubmit message.");
    }

    # Normal filtering code here...
}

This is a horrible, ugly hack.  I do NOT recommend it.  Basically,
what it does is submit all incoming mail to the clientmqueue for re-scanning.
This simulates mailscanner, but will cause mail delays (even though initial
submission will be quick.)

A better, though still ugly, solution is to change the if clause to
something like:

    if ($RealRelayAddr =~ /^192\.168\.1\./) { ... }

where the regexp matches IP addresses from which you expect senders to
connect directly with their MUAs.

That way, you only do the nasty hack for people connecting with MUAs, and
use normal "real-time" processing for everyone else.

Regards,

David.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to