On 2016-12-05 15:26, Stephan Bosch wrote:
Op 12/6/2016 om 12:23 AM schreef MRob:
I don't know how I managed to compile only using direct access of
${imap.user} before since now I get an unknown namespace error on my
test script.

But doing it this way compiles:

require ["environment", "variables", "vnd.dovecot.debug"];

if environment :matches "imap.user" "*" {
  set "u" "${1}"; }
debug_log "Found username: \${u}";
if environment :matches "name" "*" {
  set "n" "${1}"; }
debug_log "Found product name: \${n}";

The output is:

DEBUG: Found username:
DEBUG: Found product name: Pigeonhole Sieve

- For the "imap.user" environment item, you need to add:

require "imapsieve";

Hmm, I had tried that and get this:

error: require command: unknown Sieve capability `imapsieve'

I've already got imapsieve working (per above output, which was
triggered by a COPY action) so it clearly is installed and configured.

This also means that this script will only run from IMAP.

Seems as though it won't compile outside of IMAP either :)

Not if you're not using the sieve_imapsieve plugin for the Sieve
interpreter (sieve_plugins = sieve_imapsieve).

Forgive me, but what other way is there to set it up? Is there any way
to successfully compile a script with a require of "imapsieve" from
the command line?

I mean that adding "sieve_imapsieve" to sieve_plugins should fix it for you:

plugin {
    sieve_plugins = sieve_imapsieve
}

Darn, botched configuration settings. I apologize for the unnecessary thread.

Reply via email to