Package: opendkim-tools
Version: 2.11.0~alpha-12
The implementation of mt.data() is broken. The state management uses the
wrong constants, thereby causing any use of mt.data() to time out:
miltertest: select(): timeout on fd 3
The fix is straightforward. Align the mistaken use of STATE_* constants
in mt_data and mt_header with how it’s done elsewhere. The review is
also straightforward, just glance at the other functions, and you’ll see
immediately that it is a trivial bug and fix.
Unfortunately this bug renders miltertest unusable for milters that use
the ‘data’ stage. I would much appreciate if we could get this patch in.
Please let me know if I can assist you in any way. Thank you!
--- a/miltertest/miltertest.c 2014-03-20 05:36:13.000000000 +0100
+++ b/miltertest/miltertest.c 2019-12-08 12:46:55.531515893 +0100
@@ -2566,7 +2566,7 @@
ctx = (struct mt_context *) lua_touserdata(l, 1);
lua_pop(l, 1);
- if (!mt_assert_state(ctx, STATE_DATA))
+ if (!mt_assert_state(ctx, STATE_ENVRCPT))
lua_error(l);
if (CHECK_MPOPTS(ctx, SMFIP_NODATA))
@@ -2663,7 +2663,7 @@
#endif /* SMFIP_HDR_LEADSPC */
memcpy(bp, value, strlen(value) + 1);
- if (!mt_assert_state(ctx, STATE_ENVRCPT))
+ if (!mt_assert_state(ctx, STATE_DATA))
lua_error(l);
if (CHECK_MPOPTS(ctx, SMFIP_NOHDRS))
Attachment:
signature.asc
Description: PGP signature