Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

roundcube and managesieve issues

Featured Replies

Help!,

  I have roundcube installed with managesieve successfully creating filters, but I cannot seem to get the filters to work - even globally.

 

I'm using ubuntu 12.04 LTS, postfix 2.9.6 and dovecot 2.0.19.

 

I think it's my postfix configuration which reads:

 

dovecot          unix  -       n       n       -       -       pipe
        flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -c /etc/dovecot/conf.d/01-dovecot-postfix.conf -d ${recipient}

 

doveconf -n reveals lda is installed and managesieve plugin active:

 

protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    user = vmail
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }

...

protocol lda {
  deliver_log_format = msgid=%m: %$
  log_path = /var/log/sieve.log
  mail_plugins = sieve quota
  postmaster_address = postmaster@enventive.com
  quota_full_tempfail = yes
  rejection_reason = Your message to <%t> was automatically rejected:%n%r
}

 

any help will be appreciated

Look in error logs and search for relevant entries. Then post them here.

  • Author

while grepping the log, I see no errors. Here's what I got by searcjhing for "managesieve":

 

Dec 16 11:14:18 managesieve: Debug: Added userdb setting: mail=maildir:/home/mail/enventive/enventive.com/steve.adams/Maildir/
Dec 16 11:14:18 managesieve: Debug: Added userdb setting: plugin/quota=maildir:storage=0
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: Effective uid=2000, gid=2000, home=/home/mail/enventive/enventive.com/steve.adams/Maildir/
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: maildir++: root=/home/mail/enventive/enventive.com/steve.adams/Maildir, index=, control=, inbox=/home/mail/enventive/enventive.com/steve.adams/Maildir, alt=
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: sieve-storage: using active sieve script path: /home/mail/enventive/enventive.com/steve.adams/Maildir/sieve/.managesieve.sieve
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: sieve-storage: using sieve script storage directory: /home/mail/enventive/enventive.com/steve.adams/Maildir/sieve/
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: sieve-storage: using permissions from /home/mail/enventive/enventive.com/steve.adams/Maildir/sieve/: mode=0700 gid=-1
Dec 16 11:14:18 managesieve(steve.adams@enventive.com): Debug: sieve-storage: relative path to sieve storage in active link:

 

and here's what I get when I search for "sieve":

 

Dec 16 15:32:43 auth-worker: Debug: sql(ralph@enventive.com,174.62.143.115): query: SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid,  CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = 'ralph@enventive.com' OR email = 'ralph@enventive.com') AND ((imap = 1 AND 'pop3' = 'imap') OR (pop3 = 1 AND 'pop3' = 'pop3') OR 'pop3' = 'smtp' OR 'pop3' = 'sieve')

Hmm ... nothing "dangerous". Search for "error" or "fail" and post relevant output please.

 

And please nopaste your complete Dovecot Config.

Edited by junkpad92

  • Author

There are no instance of "error" nor "fail" in the doveconf or sieve logs. doveconf attached as a text file

 

 

doveconf.rtf

  • Author

specifically where should I look to adjust it? I've followed the link you suggested and heavily modified the 90-sieve.conf to add in the extensions and completely replaced the 20-managesieve.conf with the one from the tutorial. Still no errors and no script activity.

 

here's the mail log of the test transation:

 

Dec 17 00:08:00 envent postfix/smtpd[4186]: connect from mail.port-o-call.net[50.56.219.239]
Dec 17 00:08:00 envent postfix/smtpd[4186]: 9093F2126E: client=mail.port-o-call.net[50.56.219.239]
Dec 17 00:08:00 envent postfix/cleanup[4088]: 9093F2126E: message-id=<9D1E4A29-0B8C-4BBB-8BD3-F5F273F19A30@keystonedesign.com>
Dec 17 00:08:00 envent postfix/qmgr[26582]: 9093F2126E: from=<steve@keystonedesign.com>, size=4918, nrcpt=1 (queue active)
Dec 17 00:08:00 envent postfix/smtpd[4186]: disconnect from mail.port-o-call.net[50.56.219.239]
Dec 17 00:08:00 envent amavis[2989]: (02989-18) ESMTP::10024 /var/lib/amavis/tmp/amavis-20141216T162438-02989: <steve@keystonedesign.com> -> <steve.adams@enventive.com> SIZE=4918 BODY=7BIT Received: from mail.enventive.com ([127.0.0.1]) by localhost (mail.enventive.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <steve.adams@enventive.com>; Tue, 16 Dec 2014 17:08:00 -0700 (MST)
Dec 17 00:08:00 envent amavis[2989]: (02989-18) Checking: 62citP-9luZK [50.56.219.239] <steve@keystonedesign.com> -> <steve.adams@enventive.com>
Dec 17 00:08:02 envent postfix/smtpd[4093]: connect from localhost[127.0.0.1]
Dec 17 00:08:02 envent postfix/smtpd[4093]: 1F1AB220A8: client=localhost[127.0.0.1]
Dec 17 00:08:02 envent postfix/cleanup[4088]: 1F1AB220A8: message-id=<9D1E4A29-0B8C-4BBB-8BD3-F5F273F19A30@keystonedesign.com>
Dec 17 00:08:02 envent postfix/qmgr[26582]: 1F1AB220A8: from=<steve@keystonedesign.com>, size=5586, nrcpt=1 (queue active)
Dec 17 00:08:02 envent postfix/smtpd[4093]: disconnect from localhost[127.0.0.1]
Dec 17 00:08:02 envent amavis[2989]: (02989-18) FWD via SMTP: <steve@keystonedesign.com> -> <steve.adams@enventive.com>,BODY=7BIT 250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1F1AB220A8
Dec 17 00:08:02 envent postfix/virtual[4095]: 1F1AB220A8: to=<steve.adams@enventive.com>, relay=virtual, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Dec 17 00:08:02 envent postfix/qmgr[26582]: 1F1AB220A8: removed
Dec 17 00:08:02 envent amavis[2989]: (02989-18) Passed CLEAN, [50.56.219.239] [67.166.55.4] <steve@keystonedesign.com> -> <steve.adams@enventive.com>, Message-ID: <9D1E4A29-0B8C-4BBB-8BD3-F5F273F19A30@keystonedesign.com>, mail_id: 62citP-9luZK, Hits: -1.899, size: 4918, queued_as: 1F1AB220A8, 1521 ms
Dec 17 00:08:02 envent postfix/smtp[4089]: 9093F2126E: to=<steve.adams@enventive.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6, delays=0.12/0/0/1.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1F1AB220A8)
Dec 17 00:08:02 envent postfix/qmgr[26582]: 9093F2126E: removed

 

Here's the relavent dovecot log:

 

Dec 16 17:02:13 auth-worker: Debug: sql(steve.adams@enventive.com,67.166.55.4): query: SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid A$
Dec 16 17:02:13 auth: Debug: client out: OK     1       user=steve.adams@enventive.com
Dec 16 17:02:13 auth: Debug: master in: REQUEST 1734475777      4052    1       f09fc19eb101ee840af52a8a7c1d2d1c
Dec 16 17:02:13 auth-worker: Debug: sql(steve.adams@enventive.com,67.166.55.4): SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=',$
Dec 16 17:02:13 auth: Debug: master out: USER   1734475777      steve.adams@enventive.com       home=/home/mail/enventive/enventive.com/steve.adams/Maildir/    mail=maildir:/home/mail/enventive/enventive$
Dec 16 17:02:13 pop3: Debug: Loading modules from directory: /usr/lib/dovecot/modules
Dec 16 17:02:13 pop3: Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so
Dec 16 17:02:13 pop3: Debug: Added userdb setting: mail=maildir:/home/mail/enventive/enventive.com/steve.adams/Maildir/
Dec 16 17:02:13 pop3: Debug: Added userdb setting: plugin/quota=maildir:storage=0
Dec 16 17:02:13 pop3(steve.adams@enventive.com): Debug: Effective uid=2000, gid=2000, home=/home/mail/enventive/enventive.com/steve.adams/Maildir/
Dec 16 17:02:13 pop3(steve.adams@enventive.com): Debug: Quota root: name=storage=0 backend=maildir args=
Dec 16 17:02:13 pop3(steve.adams@enventive.com): Debug: maildir++: root=/home/mail/enventive/enventive.com/steve.adams/Maildir, index=, control=, inbox=/home/mail/enventive/enventive.com/steve.adams/Mail$
 

 

here's the separate sieve.log:

 

Dec 16 17:02:13 pop3-login: Info: Login: user=<steve.adams@enventive.com>, method=PLAIN, rip=67.166.55.4, lip=207.210.202.116, mpid=4053, TLS
Dec 16 17:02:13 pop3(steve.adams@enventive.com): Info: Disconnected: Logged out in=44 out=27537 top=0/0 retr=2/11462 del=0/487 size=2202822
 

do you want to see the doveconf again?

Yes please. Post your config again. :)

Your config looks horrible.

 

A quick how-to - please reset your config before you do this steps!

apt-get install dovecot-managesieved dovecot-sieve

/etc/dovecot/dovecot.conf

plugin {
    sieve = ~/sieve/.dovecot.sieve
    sieve_dir = ~/sieve
    sieve_before = /var/lib/dovecot/sieve/sieve.default
}
protocol lda {
    mail_plugins = $mail_plugins sieve
}
protocols = imap pop3 sieve

Add these new lines e.g. on the bottom:

# Sieve configuration
protocol sieve {
}

service managesieve-login {
    inet_listener sieve {
        port = 4190
    }
}

service managesieve {
}
/etc/init.d/dovecot restart

EDIT: If some passages already exists, only ADD the new parameters.

Edited by junkpad92

  • Author

Ok, I'm hitting a wall. I completely reformatted the postfix and dovecot according to my server's setting configurations in froxlor and cleaned out tons of bad entries in my config files and followed your instructions. I'm running Ubuntu 12.04, so there is no centrailized /etc/dovecot/dovecot.conf. The dovecot config is broken down into incuded configuration files: 01-mail-stack-delivery.conf, 10-auth.conf, 20-managesieve.conf, 90-sieve.conf, and 15-lda.conf have been altered. I've attached all these files for refernce and the updated doveconf. no matter what I change, the sieve scripts created in roundcube are not activated and I get no errors in the logs. I've even tried making a global sieve script and it does not get activated either...! WTF?

 

 

15-lda.conf.rtf

90-sieve.conf.rtf

20-managesieve.conf.rtf

10-auth.conf.rtf

01-mail-stack-delivery.conf.rtf

doveconf_latest.rtf

  • 2 weeks later...
  • Author

Could it be that I need to specify "protocol managesieve" rather than "protocol sieve"? I'm still fighting this and cannot get even default rules to actuate.

  • Author

Doop,

   Thanks for the reply. I'm not 100% sure how to apply the changes. Remove all lines from all config files with the red - and add all the ones with the green +?

 

Incidentally, I'm running on Ubuntu 12.04 LTS

Yup thats aboht right. Red = removal, green = new

  • Author

Doop, et. al.,

   I've updated all the config files and restarted dovecot and postfix. Even the default rules are not being processed. The one area where I anticipate a problem is where the sieve and roundcube settings look for the rules. For instance, my user mail directory is actually in:

 

So, the 90-sieve.conf where it specifies
plugin {
        sieve=~/.dovecot.sieve
        sieve_dir=~/sieve
        quota = maildir
}

 

is perhaps inaccurate and should read

sieve = /home/mail/enventive/%d/%n/Maildir/sieve/.dovecot.sieve

sieve_dir = /home/mail/enventive/%d/%n/Maildir/sieve

 

?

These diretories are where the roundcube filters rules are created!

 

----

 

To further complicate the issue, there is no .dovecot.sieve symbolic link being created by the roundcube filter. Rather, in these directories, there is only a managesieve.sieve file containing the freshly created filter rules.

 

If, in the 90-sieve.conf file I specify the sieve_global_dir =/var/lib/dovecot/sieve/ directory, create a global rule and compile it with sivec it does create a .dovecot.sieve symbolic link--- however, that rule is never actuated!

So, the 90-sieve.conf where it specifies

plugin {

        sieve=~/.dovecot.sieve

        sieve_dir=~/sieve

        quota = maildir

}

 

The configs say:

sieve = ~/sieve/.dovecot.sieve
sieve_dir=~/sieve
  • Author

Doop,

  Thanks again. I modified the config so current doveconf. -n reads:

 

plugin {
  quota = maildir
  sieve = ~/sieve/.dovecot.sieve
  sieve_dir = ~/sieve
}

 

Still no love! Can't get the scripts in /home/mail/enventive/%d/%n/Maildir/sieve/ to process, and there is no .dovecot.sieve symbolic link in that directory.

Do you restarted dovecot? Can you paste logs from dovecot?

 

EDIT: And do you really have your mails in /home/mail/ and not in /var/customers/mail/?

  • Author

Yes, I restarted dovecot. Yes, the mail directories are in /home/mail.

 

Dovecot log attached.

dovecot_log.txt.zip

There are no errors in the log. Don't know where's the problem.

 

Do you have problems with creating sieve scripts in roundcube? Maybe there are interesting lines in the roundcube logs.

  • Author

Negative, the scripts are created perfectly in Roundcube. They are just not activated nor even accessed by sieve. There is no symbolic link .dovecot.sieve. Even when I manually create a global script default.sieve it is not accessed or used.

Where are the scripts? You say "in Roundcube" but where? /var/mail/..../MailDir/sieve/

 

The YourRoundcubeSet.sieve should be there.

  • Author

Scripts are in /home/mail/customer/domain/user/Maildir/sieve/

 

listing that directory:

ls -la
total 20
drwx------  3 vmail vmail 4096 Jan  8 10:02 .
drwx------ 11 vmail vmail 4096 Jan 13 08:03 ..
-rw-------  1 vmail vmail  317 Jan  8 10:02 managesieve.sieve
-rw-------  1 root  root   313 Dec 16 16:56 managesieve.svbin
drwx------  2 vmail vmail 4096 Jan  8 10:02 tmp

 

that managesieve.sieve file looks like this:

 

require ["vacation","fileinto","copy"];
# rule:[vacation]
if true
{
        vacation :days 10 :subject "out of office reply" "I'm out of the office";
}
# rule:[junk]
if header :contains "Subject" "*** Spam >"
{
        fileinto "INBOX.Junk";
        stop;
}

 

I have also tried configuring 90-sieve.conf with several alternate solutions such as:

 

  # is also where the ManageSieve service stores the user's scripts.
  sieve_dir = /home/mail/enventive/%d/%n/Maildir/sieve, sieve_dir = ~/Maildir/sieve, sieve_dir = ~/sieve

as well as:

sieve = /home/mail/enventive/%d/%n/Maildir/sieve/.dovecot.sieve, sieve = ~/sieve/managesieve.sieve, sieve = ~/sieve/.dovecot.sieve

 

all with no luck

The scripts are created correctly, so the config is ok. Do you have installed ALL sieve-packages from Dovecot? Managesieve AND sieve? Maybe you have only installed managesieve - so the scripts can be created but Dovecot does not execute them.

 

And please use this config:

sieve_dir = ~/sieve
sieve = ~/sieve/.dovecot.sieve

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.