[Mimedefang] Return Codes from filter Functions

Richard Laager rlaager at wiktel.com
Wed Mar 7 20:18:23 EST 2012

On Wed, 2012-03-07 at 19:50 -0500, David F. Skoll wrote:
> > Would there be any interest in patches which merge those behaviors? If
> > so, which way?
> I think you'll find it's not easy to change the behaviors without a major
> rewrite of the Perl code.  This has been on our TODO list for a long time,
> but it never seems to happen...

I looked at this briefly and it didn't look too bad. For example, to
merge in the direction of action_bounce(), the following changes are
      * In action_bounce (etc.), if !$InMessageContext, save the reply,
        code, and dsn to global variables. Also, set a global variable
        for the fact that we want a bounce (vs. tempfail or discard).
      * In sender_ok (etc.), setup the additional globals. Then, if $ok
        is undefined, look to the global variables.
      * Add something like action_no_more_filtering().

To merge in the direction of return codes, one would just check the
return codes from filter_end (etc.) and call action_bounce, etc.

Either way, the mimedefang-filter man page would need updating, of

Both of these approaches would be backwards compatible with existing

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20120307/f2c3624f/attachment-0003.sig>

More information about the MIMEDefang mailing list