Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert SMFIF capabilities so that LUA odkim.add_rcpt, odkim.del_rcpt, odkim.del_header and odkim.quarantine actually work #211

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions opendkim/opendkim.c
Original file line number Diff line number Diff line change
Expand Up @@ -11005,15 +11005,26 @@ mlfi_negotiate(SMFICTX *ctx,
# ifdef _FFR_VBR
conf->conf_vbr_purge ||
# endif /* _FFR_VBR */
# ifdef USE_LUA
conf->conf_finalscript != NULL ||
# endif /* USE_LUA */
conf->conf_remsigs)
reqactions |= SMFIF_CHGHDRS;

# ifdef SMFIF_QUARANTINE
# ifdef USE_LUA
if (conf->conf_capture || conf->conf_finalscript != NULL)
# else /* USE_LUA */
if (conf->conf_capture)
# endif /* USE_LUA */
reqactions |= SMFIF_QUARANTINE;
# endif /* SMFIF_QUARANTINE */

# ifdef USE_LUA
if (conf->conf_redirect != NULL || conf->conf_finalscript != NULL)
# else /* USE_LUA */
if (conf->conf_redirect != NULL)
# endif /* USE_LUA */
{
reqactions |= SMFIF_ADDRCPT;
reqactions |= SMFIF_DELRCPT;
Expand Down Expand Up @@ -16900,7 +16911,11 @@ main(int argc, char **argv)

smfilter.xxfi_flags = SMFIF_ADDHDRS;

#ifdef USE_LUA
if (curconf->conf_redirect != NULL || curconf->conf_finalscript != NULL)
#else /* USE_LUA */
if (curconf->conf_redirect != NULL)
#endif /* USE_LUA */
{
smfilter.xxfi_flags |= SMFIF_ADDRCPT;
smfilter.xxfi_flags |= SMFIF_DELRCPT;
Expand All @@ -16918,10 +16933,17 @@ main(int argc, char **argv)
#ifdef _FFR_VBR
curconf->conf_vbr_purge ||
#endif /* _FFR_VBR */
#ifdef USE_LUA
curconf->conf_finalscript != NULL ||
#endif /* USE_LUA */
curconf->conf_remsigs)
smfilter.xxfi_flags |= SMFIF_CHGHDRS;
#ifdef SMFIF_QUARANTINE
#ifdef USE_LUA
if (curconf->conf_capture || curconf->conf_finalscript != NULL)
#else /* USE_LUA */
if (curconf->conf_capture)
#endif /* USE_LUA */
smfilter.xxfi_flags |= SMFIF_QUARANTINE;
#endif /* SMFIF_QUARANTINE */

Expand Down