On 10/30/20 10:11 AM, @lbutlr wrote:

So, I have the sieve working up to the point that it calls the script, and the 
script is called (I get different errors if the script is not there, for 
example).



filter action

   execute program `darkmode.sh'

   [[EXECUTION ABORTED]]



There's no other error logged (for example, when I had sieve_filter_bin_dir 
miss-set, I would get:



sieve: action filter: failed to execute program `darkmode.sh': 
vnd.dovecot.filter extension is unconfigured



In /var/log/messages, but I fixed that.



I assume there is something wrong with what I am doing in the script, bit that 
is something I am not finding any examples on that are proving useful.



The script file is simply:



Darkmode.sh:

#!/bin/sh

echo $1 | sed -e '|</head>|<style>* {color:white !important; background-color: black 
!important; } </style></head>|'



Which is somehwat similar to a working script for reporting spam:



sa-learn-spam.sh:

#!/bin/sh

exec /usr/local/bin/sa-learn -u ${1} --spam

wrong, or different, I can't say.  if helpful, for my script executions, I 
successfully do



        require ["vnd.dovecot.pipe", "vnd.dovecot.filter", "vnd.dovecot.execute", "copy", "environment", 
"variables", "vnd.dovecot.debug", "vnd.dovecot.imapsieve", "imapsieve"];

        execute :pipe "msmtp_sender.sh" ["<arg1>", "<arg1>", "<arg1>"];





note the " :pipe" usage.  similar to examples here,



  https://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Extprograms





Reply via email to