Le 09-Jan-10 20:29, Stephan Bosch a écrit :

I thought this would be an excellent opportunity to test the new
Pigeonhole plugin support and also to do something interesting with the
namespace functionality of the variables extension. That is why I gave
this a short look, which promptly resulted in a preliminary implementation.

If you want to play around with it, you can download it from:

http://hg.rename-it.nl/pigeonhole-sieve-extdata/

It will compile and run with both Pigeonhole for Dovecot v1.2 and
Pigeonhole for Dovecot v2.0, but only with the tip Mercurial revisions
(since only those have plugin support).
Thanks Stephan,

I have the extdata plugin compiled, and am now trying to make a global sieve script to test it. I'm running into problems when using sievec to compile the script - I'm not getting the plugin's variables that are provided in dovecot.conf's plugin {}. I added a few sieve_sys_warning messages to track the calls to sieve_setting_get()

<output>
/usr/local/bin/sievec -d -P sieve_extdata /usr/local/etc/dovecot/sieve/before.sv Warning: sieve: sieve_setting_get: req: 'sieve_max_script_size' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_max_actions' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_max_redirects' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_subaddress_sep' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'recipient_delimiter' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_plugin_dir' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_plugins' res: '(null)'
Warning: sieve: sieve_setting_get: req: 'sieve_extdata_dict_uri' res: '(null)' Warning: sieve: extdata: no dict uri specified, extension is unconfigured (sieve_extdata_dict_uri is not set).

* Required extensions:

  0: vacation (9)
  1: variables (17)
  2: vnd.dovecot.extdata (29)

* Main program (block: 1):

00000000: EXTENSIONS [3]:
00000001:   vacation
00000002:   variables
00000003:     SCOPE [0] (end: 00000008)
00000008:   vnd.dovecot.extdata
00000009: VACATION
0000000a:   (source line: 3)
0000000d:   subject: VAR ${extdata.vacation_subject}
00000023:   reason: VAR ${extdata.vacation_message}
00000038: handle: STR[77] "${extdata.vacation_message}${extdata.vacation_subject}<default-from><NO-MIME>"
00000088: [End of code]
</output>

I'm new to dovecot's internals, it looks like it just needs some environment variables provided, but I'm puzzled as to how this is to be done. I've traced it through sievec.c -> sieve_tool_sieve_env -> sieve_tool_get_setting -> getenv() call.

More info:
1. I've traced the process, there's no attempt to open or stat any dovecot.conf 2. using tip dovecot-1.2, dovecot-1.2-sieve, pigeonhole-sieve-extdata. I pulled+updated & rebuilt and confirmed the above behaviour just prior to sending this message. 3. The test scripts run because the test framework uses the test_config mechanism to provide sieve_extdata_dict_uri.

Any hints on how to get the dovecot.conf data to sievec?

Thanks,

-Martin Foster

Reply via email to