On 23 Sep 2020, at 14:07, Marc Roos <M.Roos at f1-outsourcing.eu> wrote:> It is just a sieve rule. > > 1. > On disk default file .dovecot.sieve > > 2. I am using roundcube webmail for that. > > 3. with if false # true > # rule:[Out of Office] > if true > { > vacation :days 1 :subject "Test" "test test"; > }Is there a way to inject variables from the userdb into the above? For example, if I was to pass the vacation message attribute through the userdb lookup, could I then test if the variable was present, and then embed that variable in the message? Regards, Graham ?
You can do whatever you like, as long as the result is this 'text' file. I have also bash file that modifies this file for users. You can make a 5 min cron job that detects changes in ldap and then creates the sieve rule. -----Original Message----- Cc: dovecot Subject: Re: Vacation sieve explained: how does it work?> It is just a sieve rule. > > 1. > On disk default file .dovecot.sieve > > 2. I am using roundcube webmail for that. > > 3. with if false # true > # rule:[Out of Office] > if true > { > vacation :days 1 :subject "Test" "test test"; }Is there a way to inject variables from the userdb into the above? For example, if I was to pass the vacation message attribute through the userdb lookup, could I then test if the variable was present, and then embed that variable in the message? Regards, Graham ?
> On 23. Sep 2020, at 15.15, Graham Leggett <minfrin at sharp.fm> wrote: > > On 23 Sep 2020, at 14:07, Marc Roos <M.Roos at f1-outsourcing.eu> wrote: > >> It is just a sieve rule. >> >> 1. >> On disk default file .dovecot.sieve >> >> 2. I am using roundcube webmail for that. >> >> 3. with if false # true >> # rule:[Out of Office] >> if true >> { >> vacation :days 1 :subject "Test" "test test"; >> } > > Is there a way to inject variables from the userdb into the above? > > For example, if I was to pass the vacation message attribute through the userdb lookup, could I then test if the variable was present, and then embed that variable in the message?Pigeonhole can read sieve scripts from ldap too https://wiki.dovecot.org/Pigeonhole/Sieve/Configuration/LDAP <https://wiki.dovecot.org/Pigeonhole/Sieve/Configuration/LDAP> Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200923/8551ef8b/attachment-0001.html>
On 23 Sep 2020, at 14:29, Marc Roos <M.Roos at f1-outsourcing.eu> wrote:> You can do whatever you like, as long as the result is this 'text' file. > I have also bash file that modifies this file for users. You can make a > 5 min cron job that detects changes in ldap and then creates the sieve > rule.I've tried the cronjob approach before, and people didn?t like the delay. I have found the extra fields being queried from the userdb, user_attrs = mailMessageStore=home=%$,=mail_auto_reply_mode=%{ldap:mailAutoReplyMode},=mail_auto_reply_text=%{ldap:mailAutoReplyText} Is it possible to confirm how the mail_auto_reply_mode variable would be available in sieve? Is it just a case of referring to ${mail_auto_reply_mode} or is there more to it than that? Regards, Graham ?
On 23 Sep 2020, at 15:37, Sami Ketola <sami.ketola at dovecot.fi> wrote:> Pigeonhole can read sieve scripts from ldap too https://wiki.dovecot.org/Pigeonhole/Sieve/Configuration/LDAP <https://wiki.dovecot.org/Pigeonhole/Sieve/Configuration/LDAP>Thanks for confirming this - it will need some updates to our LDAP, but this is another thing for us to try. Regards, Graham ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200923/d1f333a5/attachment.html>