trusteddomainproject / OpenDKIM

Other
97 stars 52 forks source link

Lua final policy script functions may not work as expected #213

Open branciar opened 7 months ago

branciar commented 7 months ago

The Lua final policy script functions odkim.add_rcpt, odkim.del_rcpt, odkim.del_header and odkim.quarantine need specific Milter capability flags to be set, respectivley SMFIF_ADDRCPT, SMFIF_DELRCPT, SMFIF_CHGHDRS and SMFIF_QUARANTINE.

However these flags are set only if specific configuration parameters are used. For example, SMFIF_ADDRCPT and SMFIF_DELRCPT are set only if RedirectFailuresTo is defined.

This leads to situations where the affected Lua functions are unusable.

211 fixes this by enforcing SMFIF_ADDRCPT, SMFIF_DELRCPT, SMFIF_CHGHDRS and SMFIF_QUARANTINE if FinalPolicyScript is defined.