Replies: 2 comments 4 replies
-
It looks like the error message is due to this code in sieve-rs ( _ => {
if state.has_capability(&Capability::Ihave) {
state.ignore_instruction()?;
state.instructions.push(Instruction::Invalid(Invalid {
name: instruction.to_string(),
line_num: token_info.line_num,
line_pos: token_info.line_pos,
}));
continue;
} else {
return Err(CompileError {
line_num: state.block.line_num,
line_pos: state.block.line_pos,
error_type: ErrorType::UnexpectedToken {
expected: "command".into(),
found: instruction.to_string(),
},
});
}
} I'm unsure if the reported |
Beta Was this translation helpful? Give feedback.
-
Sigh. After careful review of the stalwart documentation, I now recall that I had I've now updated it to do the following: set "fqln" "${listname}@${domain}"
# ...
# Generate the cookie using `cookiemonster`
let "cookie" "exec('/usr/local/bin/cookiemonster', [ 'generate', fqln, 'subscribe', envelope.from ] )";
if string :is "${cookie}" "" {
discard;
} Which fixed the compile error. I then had a second bug in the Now, All four scripts load / compile without error. Sweet! And .... a test email to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
All,
I'm so close I can taste it :-)
Under Settings -> Scripting -> System Scripts, I've added four scripts, one each for
+subscribe
,+sub-confirm
,+unsubscribe
, and+unsub-confirm
. For brevity, I'll only includesubscribe.sieve
:I've wired all four of them up with
rcpt == ('listname+subscribe@example.com') => 'subscribe.sieve'
. I've verified this withstalwart-cli ... list-config session.data.script
.For all four scripts, when hitting Reload in the web interface, I get the exact same error:
I've tried
command
,exec
,pipe
, and nothing else works. Originally, I requiredpipe
, but on reviewing the source code for stalwart, I changed it toexec
.Any ideas how I can get this fixed?
Beta Was this translation helpful? Give feedback.
All reactions