Hi everyone,

In the following configuration my IMAPSieve script doesn't run on the configured "copy" action when I assign it to a virtual mailbox.

However, using the very same config snippet on a regular mailbox, the script suddenly starts to work. Move direction: from virtual to virtual (INBOX/Primary to INBOX/Notification).

Do you know how to assign IMAPSieve to virtual mailboxes?

Virtual config:

namespace virtual-classification {
  prefix = "INBOX/"
  separator = /
  mail_driver = virtual
  mail_path = /var/lib/dovecot/virtual/classification/en
  mail_index_path = %{home}/index/virtual/classification/en
  namespace_subscriptions = no

  mailbox Notification {
    auto = subscribe

    sieve_script classification-move1 {
      type = before
      cause = copy append
      path = /var/lib/dovecot/sieve/imapsieve.d/classification-move.sieve
    }
  }
  mailbox Primary { [...] }
}

Sieve script:

require ["vnd.dovecot.debug"];
debug_log "IMAPSIEVE SCRIPT WAS CALLED!";

Virtual file:

virtual/classification/en/Notification/dovecot-virtual:
!INBOX
  KEYWORD classification-notification

The same result with "!INBOX" and "INBOX".

Inbox namespace (working example):

namespace inbox {
  separator = /
  inbox = yes
  mail_path = %{home}/mail
  mail_index_path = %{home}/index/inbox

  mailbox "Archive" {
    special_use = \Archive
    auto = subscribe

    sieve_script classification-move1 {
      type = before
      cause = copy append
      path = /var/lib/dovecot/sieve/imapsieve.d/classification-move.sieve
    }
  }
}

In the latter case the script is called properly and I see the debug message in info.log.

But in the virtual case, the script doesn't run. Debug logs of failing case:

Mailbox INBOX: Mailbox opened
Mailbox INBOX/Primary: Mailbox opened
Mailbox INBOX: Mailbox opened
Namespace inbox: Using permissions from /var/spool/mail/[...]//mail: mode=0700 gid=default
Mailbox INBOX: Mailbox opened
Mailbox INBOX: imapsieve: MOVE event
Mailbox INBOX: UID 2147: Expunge requested
Mailbox INBOX/Primary: UID 47: Expunge requested
dict(file): dict created (driver=file)
dict(file): Looking up 'shared/90b3ed0066c4fe670a000000b7545530/imapsieve/script' dict(file): Lookup finished for 'shared/90b3ed0066c4fe670a000000b7545530/imapsieve/script': not found Mailbox INBOX: imapsieve: Mailbox attribute /shared/imapsieve/script not found dict(file): Looking up 'shared/90b3ed0066c4fe670a000000b7545530/vendor/vendor.dovecot/pvt/server/imapsieve/script' dict(file): Lookup finished for 'shared/90b3ed0066c4fe670a000000b7545530/vendor/vendor.dovecot/pvt/server/imapsieve/script': not found Mailbox INBOX: imapsieve: Server attribute /shared/imapsieve/script not found
duplicate db: Initialize
sieve: Pigeonhole version 2.4.1-4 (0a86619f) initializing
Loading modules from directory: /usr/lib64/dovecot/modules/sieve
Module loaded: /usr/lib64/dovecot/modules/sieve/lib90_sieve_extprograms_plugin.so Module loaded: /usr/lib64/dovecot/modules/sieve/lib90_sieve_imapsieve_plugin.so sieve: Sieve Extprograms plugin for Pigeonhole version 2.4.1-4 (0a86619f) loaded sieve: Sieve imapsieve plugin for Pigeonhole version 2.4.1-4 (0a86619f) loaded
fts-flatcurve: fts-flatcurve(INBOX): Expunge uid=2147
fts-flatcurve: fts-flatcurve(INBOX): Opened DB (RO) messages=136 version=1 shards=2 fts-flatcurve: fts-flatcurve(INBOX): Opened DB (RW, current.1755771145431021) messages=48 version=1
Mailbox INBOX: UID 2147: Mail expunged
fts-flatcurve: fts-flatcurve(INBOX): Committed 1 changes to DB (RW, current.1755771145431021) in 0.003 secs
fts-flatcurve: fts-flatcurve: Update transaction completed in 0.004 secs
Mailbox INBOX/Primary: Backend mailbox INBOX changed: UIDNEXT changed: 2277 -> 2278

IMAPSieve config seems to work (based on the successful regular mailbox example), so I don't paste the whole sieve config (but in case it's necessary, I'll do it).

Ákos

_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to