Sieve filter script EXECUTION FAILED
Aki Tuomi
aki.tuomi at open-xchange.com
Fri Oct 30 20:40:53 EET 2020
> On 30/10/2020 20:34 @lbutlr <kremels at kreme.com> wrote:
>
>
> On 30 Oct 2020, at 11:57, Aki Tuomi <aki.tuomi at open-xchange.com> wrote:
> > But I think the sed here is missing 's' from start, so this does not actually do anything...
>
> Copy/paste/edit error. The s is there in the file.
>
> darkmode.sh:
> #!/bin/sh
> echo $1 | sed -e 's|</head>|<style>* {color:white !important; background-color: black !important; } </style></head>|'
>
> I am not sure about the $1. I think filter just pipes the message (or part of the message.
>
> I will see what happens without the echo I suppose.
>
> Nope, still the same.
>
> 32: starting `:contains' match with `i;ascii-casemap' comparator:
> 32: matching value `<!DOCTYPE html><html lang="en"><head><title>29-Oct-2020 ""</title> <style>?? ...'
> 32: with key `</head>' => 1
> 32: finishing match with result: matched
> 32: jump if result is false
> 32: not jumping
> 34: filter action
> 34: execute program `darkmode.sh'
> 34: [[EXECUTION ABORTED]]
>
> --
> They looked at the drinks.
> They drank the drinks.
I am pretty sure that you are holding filter wrong, it expects you to process the entire mail, not just $1.
Aki
More information about the dovecot
mailing list