imapsieve and master user

André Rodier andre at rodier.me
Wed Apr 7 09:14:33 EEST 2021


On Wed, 2021-04-07 at 02:13 +0200, Stephan Bosch wrote:
> 
> On 04/04/2021 22:19, André Rodier wrote:
> > Hello all,
> > 
> > I have am imap sieve script, running fine.
> > 
> > I would like to check, if it is possible, inside the sieve script,
> > if
> > the current user is a master user or not.
> > I believe this is probably not possible.
> > 
> > Otherwise, if it is not possible, I would like to check for an
> > external
> > condition, like an existing file in /tmp or in the mail dir folder,
> > for
> > instance.
> > 
> > The issue is that I want my imap sieve script behave differently if
> > the
> > master user is connected.
> > 
> > Thanks for any piece of advice.
> 
> Maybe you could fudge something by adding a sieve_env_ field to
> master 
> user's userdb lookup and configuring the vnd.dovecot.environment
> extension:
> 
> https://github.com/dovecot/pigeonhole/blob/master/doc/extensions/vnd.dovecot.environment.txt
> https://raw.githubusercontent.com/dovecot/pigeonhole/master/doc/rfc/spec-bosch-sieve-dovecot-environment.txt

Thanks, Stephan,

I ended up using another method. The goal was to prevent email clients
to copy emails in the Sent folder, but still allow import emails
procedure to append emails using the APPEND verb in this folder.

I used sieve include, and added "keep;stop" in the included file during
the import procedure.

However, thanks to you, I know know what is possible.

Kind regards,
André

> 
> > Kind regards,
> > André Rodier
> > 



More information about the dovecot mailing list