Op 5-12-2016 om 16:22 schreef Stephan Bosch:
Op 5-12-2016 om 16:10 schreef MRob:
On 2016-12-05 06:13, Stephan Bosch wrote:
Op 5-12-2016 om 14:32 schreef MRob:
Could you show me your full script? I am mainly interested in the require statements involved.
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";
This also means that this script will only run from IMAP.
- For the "${imap.user}" variable, you need to add:
Uhm, this should be ${env.imap.user} of course.
Regards,
Stephan.