Skip to content
Snippets Groups Projects
Commit 095b2e12 authored by Stephan Bosch's avatar Stephan Bosch Committed by Timo Sirainen
Browse files

testsuite: Make SMTP actions also work inside executed sieve scripts.

parent 17ae453d
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "testsuite-common.h" #include "testsuite-common.h"
#include "testsuite-settings.h" #include "testsuite-settings.h"
#include "testsuite-log.h" #include "testsuite-log.h"
#include "testsuite-smtp.h"
#include "testsuite-result.h" #include "testsuite-result.h"
#include "testsuite-script.h" #include "testsuite-script.h"
...@@ -115,10 +116,11 @@ bool testsuite_script_run(const struct sieve_runtime_env *renv) ...@@ -115,10 +116,11 @@ bool testsuite_script_run(const struct sieve_runtime_env *renv)
return FALSE; return FALSE;
} }
scriptenv.default_mailbox = "INBOX"; scriptenv.default_mailbox = "INBOX";
scriptenv.smtp_start = NULL; scriptenv.smtp_start = testsuite_smtp_start;
scriptenv.smtp_add_rcpt = NULL; scriptenv.smtp_add_rcpt = testsuite_smtp_add_rcpt;
scriptenv.smtp_send = NULL; scriptenv.smtp_send = testsuite_smtp_send;
scriptenv.smtp_finish = NULL; scriptenv.smtp_abort = testsuite_smtp_abort;
scriptenv.smtp_finish = testsuite_smtp_finish;
scriptenv.duplicate_mark = NULL; scriptenv.duplicate_mark = NULL;
scriptenv.duplicate_check = NULL; scriptenv.duplicate_check = NULL;
scriptenv.trace_log = renv->scriptenv->trace_log; scriptenv.trace_log = renv->scriptenv->trace_log;
...@@ -193,10 +195,11 @@ bool testsuite_script_multiscript ...@@ -193,10 +195,11 @@ bool testsuite_script_multiscript
return FALSE; return FALSE;
} }
scriptenv.default_mailbox = "INBOX"; scriptenv.default_mailbox = "INBOX";
scriptenv.smtp_start = NULL; scriptenv.smtp_start = testsuite_smtp_start;
scriptenv.smtp_add_rcpt = NULL; scriptenv.smtp_add_rcpt = testsuite_smtp_add_rcpt;
scriptenv.smtp_send = NULL; scriptenv.smtp_send = testsuite_smtp_send;
scriptenv.smtp_finish = NULL; scriptenv.smtp_abort = testsuite_smtp_abort;
scriptenv.smtp_finish = testsuite_smtp_finish;
scriptenv.duplicate_mark = NULL; scriptenv.duplicate_mark = NULL;
scriptenv.duplicate_check = NULL; scriptenv.duplicate_check = NULL;
scriptenv.trace_log = renv->scriptenv->trace_log; scriptenv.trace_log = renv->scriptenv->trace_log;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.