John Rudd wrote:
dalchri wrote:
Well, I setup MIMEDefang. Everything is working as I want except that
the
(fake) rejected mail does not make it through the milter to Exchange. I
used action_bounce to reject the message in mimedefang-filter.
Is there a way to send the rejection code but still get the message
through
the milter?
I think I might be leaning towards Exim for it's fake reject feature if I
can't get this to work.
Thanks for all the feedback!
You should probably ask that question on the mimedefang mailing list.
Ok, you tickled my curiosity. My thought is:
where you're doing "action_bounce($error_message, $code, $dsn)" do this:
resend_message("[EMAIL PROTECTED]");
action_bounce($error_message, $code, $dsn);
resend_message() sends the full original message (including bad content
that you may have rejected in other parts of mimedefang) to the new
recipient(s). As the mimedefang-filter manpage warns, you should only
call it in filter_end or filter_begin, otherwise it might get called
multiple times. If you're doing your spam rejection in filter_end, then
that's a good place to call it.
You could, alternately, do:
action_quarantine_entire_message($some_message_to_the_sysadmin);
action_bounce($error_message, $code, $dsn);
That will put the message into the mimedefang quarantine, instead of
sending it to some address on the exchange server. It's just a matter
of where you want to hold the message.