summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-06-22 13:21:04 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2015-06-22 14:12:58 +0100
commit3481c572b379260a57ebfafb46eee0600780add3 (patch)
treedc77553c816c827f623b16c9e3c7ca7a2c24058f /src
parent47c209581825b5425b4d0c50371fa7f4aa3516c7 (diff)
Fix support of $spam_ variables at delivery time. Bug 1647
This change is forced on us by the documentation claiming clearly the support is there, though the code does not and never has. The doc change that introduced the claim is 7d9f747b5ef8
Diffstat (limited to 'src')
-rw-r--r--src/src/spool_in.c6
-rw-r--r--src/src/spool_out.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/src/spool_in.c b/src/src/spool_in.c
index 1a5bf4ec8..fdc83e5a7 100644
--- a/src/src/spool_in.c
+++ b/src/src/spool_in.c
@@ -298,6 +298,8 @@ tls_in.ocsp = OCSP_NOT_REQ;
#endif
#ifdef WITH_CONTENT_SCAN
+spam_bar = NULL;
+spam_score = NULL;
spam_score_int = NULL;
#endif
@@ -573,6 +575,10 @@ for (;;)
if (Ustrncmp(p, "ender_set_untrusted", 19) == 0)
sender_set_untrusted = TRUE;
#ifdef WITH_CONTENT_SCAN
+ else if (Ustrncmp(p, "pam_bar ", 8) == 0)
+ spam_bar = string_copy(big_buffer + 10);
+ else if (Ustrncmp(p, "pam_score ", 10) == 0)
+ spam_score = string_copy(big_buffer + 12);
else if (Ustrncmp(p, "pam_score_int ", 14) == 0)
spam_score_int = string_copy(big_buffer + 16);
#endif
diff --git a/src/src/spool_out.c b/src/src/spool_out.c
index 92bf0aa64..39d0fea25 100644
--- a/src/src/spool_out.c
+++ b/src/src/spool_out.c
@@ -218,7 +218,9 @@ if (sender_local) fprintf(f, "-local\n");
if (local_error_message) fprintf(f, "-localerror\n");
if (local_scan_data != NULL) fprintf(f, "-local_scan %s\n", local_scan_data);
#ifdef WITH_CONTENT_SCAN
-if (spam_score_int != NULL) fprintf(f,"-spam_score_int %s\n", spam_score_int);
+if (spam_bar) fprintf(f,"-spam_bar %s\n", spam_bar);
+if (spam_score) fprintf(f,"-spam_score %s\n", spam_score);
+if (spam_score_int) fprintf(f,"-spam_score_int %s\n", spam_score_int);
#endif
if (deliver_manual_thaw) fprintf(f, "-manual_thaw\n");
if (sender_set_untrusted) fprintf(f, "-sender_set_untrusted\n");