I ran into an issue when trying to wildcard match the email body where the variable was empty, which lead me to extracttext and forverypart, however I am running into an odd error.

When I deliver an email with the body of 'this is the body text of email' it dies with the following error:

sogo: line 236: error: specified :args item `this is the body text of email??' is invalid


The sieve in question:


if header :matches "Subject" "*" { set "emailsubject" "${1}"; }
if header :matches "From" "*" { set "emailfrom" "${1}"; }

foreverypart
{
    if header :mime :type :is "Content-Type" "text"
    {
           extracttext :first 80 "emailbody";
           break;
    }
}


execute "script.php" ["${emailfrom}", "${emailsubject}", "${emailbody}"];


I tried downloading the log to see if ?? was a character not rendering correctly in console, but local text editors show the same. I'm not sure where it is coming from or what it is. I tried :quotewildcard with

set :quotewildcard "quotedbody" ${emailbody}";

And passed "${quotedbody}" as an argument, however the same error was appearing in the logs. If I'm approaching this problem incorrectly, the end result is I want to pass the entire contents of the email to the script.

 - Jonathan

_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to