Roundcube Filter Set by ManagedSieve Not Found

dovecotsieve

Here is my current filter:

require ["vacation"];
# rule:[Filter Test]
if allof (exists "from")
{
        vacation :days 365 :addresses "newmail@vietfeir.com" :subject "Mailbox disabled" :from "newmail@vietfeir.com" text:
The mailbox dennis@vietfeir.com is no longer active. Please reply to this message and request the new address.

Thank you.

I have observed that it will work one time and the reply is returned to the sender. Any subsequent email does not get a reply. If I send a message from another mailbox, it receives the reply. What may cause that behavior?

So, what I really want is an auto-reply that is sent out every time a message is received. Roundcube has a configuration option called "Responses" which I assumed would do that but it has no effect. I have posted to the Roundcube community about this.

ANOTHER UPDATE

This is baffling. After a few hours, I decided to modify the script. Now I am getting the message "sieve: User has no active script in storage" again, which is what prompted this post originally.

UPDATE

I ended up commenting out the user script location in /etc/dovecot/conf.d/90-sieve.conf. After doing that, any filters I create in Roundcube are working properly.

So, what is the purpose of that specification and what is the default


I'm a newbie to ManagedSieved. The debug log says the user has no personal scripts. I have specified the user script location as:

sieve = /var/mail/vhosts/%d/%u/sieve/*.sieve

This is not working. When I create a filter with Roundcube, it is place here:

/var/mail/vhosts/vietfeir.com/dennis_gray/sieve

The name of the file is roundcube.sieve

Now how to I set the user script location to point there? I have not been able to figure out the correct syntax.

I have the following test script created by Roundcube. Its name is roundcube.sieve:

# rule:[Redirect Test]
if allof (header :contains "subject" "redirect")
{
        redirect "dev@vietfeir.com";
}

I have debugging on and saw messages like this in the log:

Apr 17 10:11:10 lmtp(d0325mgray@vietfeir.com): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: file storage: Storage path
`/var/mail/vhosts/vietfeir.com/d0325mgray/.dovecot.sieve' not found
Apr 17 10:11:10 lmtp(d0325mgray@vietfeir.com): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: User has no active script i
n storage `/var/mail/vhosts/vietfeir.com/d0325mgray/sieve'
Apr 17 10:11:10 lmtp(d0325mgray@vietfeir.com): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: User has no personal script

The Roundcube script I created is definitely stored in the path for the user so I don't know why it is reporting that it is not.

The before.sieve script is being executed with no problem.

Output of dovecot -n:

# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags notify
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  args = /etc/dovecot/deny-users
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  sieve_before = /var/mail/before.sieve
  sieve_extensions = +notify +imapflags
  sieve_trace_dir = /var/mail
  sieve_trace_level = matching
}
postmaster_address = dev@vietfeir.com
protocols = imap lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key =  # hidden, use -P to show it
userdb {
  driver = passwd
}
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
}
protocol lmtp {
  mail_plugins = " sieve sieve"
}
protocol lda {
  mail_plugins = " sieve"
}

Best Answer

I am satisfied that I understand how these filters work now. When I create a filter with Roundcube, it places it in

/var/mail/vhosts/[domain]/[user]/sieve/roundtree.sieve

It then creates a symbolic link to that file in

/var/mail/vhosts/[domain]/[user]/.dovecot.sieve

then, on the first invocation of the filter, it is compiled into .dovecot.svbin in that same directory.

I can consider this closed now.

Related Topic