1 (edited by AshcorTech 2013-08-28 04:09:03)

Topic: Roundcube filters don't work

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): myslq
- Linux/BSD distribution name and version: OpenSUSE 12.3
- Related log if you're reporting an issue: unknown
====

while testing greylisting I set up a script on another server to send me an email every 1 minute to see if autowhitelist would get a record at some point.  In order to not have my inbox fill up, in roundcube I set a filter on my account to delete the test messages based on the "From" address containing a keyword. 

However this filter does not seem to work at all and I'm not sure which log to look in to see what's happening.

Anyone have any issues like this or can point me to the correct logs to see what, if anything the sieve filters are doing?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube filters don't work

Ok, found the FAQ on this...

here's my settings and log entries..


sieve.log:

Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: script file /data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.19//.dovecot.sieve not found
Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: user's script ~/.dovecot.sieve doesn't exist (using default script location instead)
Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: script file /data/vmail/sieve/dovecot.sieve not found
Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: default user script /data/vmail/sieve/dovecot.sieve doesn't exist
Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: user has no valid location for a personal script
Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: no scripts to execute: reverting to default delivery.
Aug 27 16:25:18 lda(jeff.mckeon@ashcortechnologies.com): Info: msgid=<20130827202506.GA7767@opsup.telaurus.net>: saved mail to INBOX


/etc/dovecot/dovecot.conf


    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    sieve_dir = /%L%h/sieve/dovecot.sieve
    sieve_dir = /%L%h/sieve/dovecot.sieve

    # Global sieve settings.
    sieve_global_dir = /data/vmail/sieve
    sieve_global_path = /data/vmail/sieve/dovecot.sieve
    #sieve_before =
    #sieve_after =

mail directories:

/data/vmail/sieve/
dovecot.sieve.sample

linux01:/data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.19/sieve
files: dovecot.sieve,  dovecot.svbin,  managesieve.sieve

3

Re: Roundcube filters don't work

It should be '%Lh' in dovecot.conf, not '%L%h'.

4 (edited by AshcorTech 2013-08-28 09:23:04)

Re: Roundcube filters don't work

yeah, had %Lh and that didn't work either... but I'll set it back..

here's where I'm confused and it doesn't look correct...

sieve log:

Debug: sieve: script file /data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.19//.dovecot.sieve not found

this part is all correct:

/data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.1

however, why is the next part, that which I assume is set in the dovecot.conf sieve section like this?

//.dovecot.sieve

Two "/" and a "."  doesn't seem right.

5

Re: Roundcube filters don't work

ok, got it working again but I don't have a "warm and fuzzy" feeling about it.

Originally I had my data directory named "/DATA" all caps, which messed up dovecot because the %L converted the path to all lower case.  I "fixed" this by removing the %L. 

You, ZhangHuangbin, had told me this wasn't a good idea because if I migrated to another server with these settings it wouldn't work out.  So I edited my fstab file to mount to "/data" on boot.

Figuring it was now safe to put the %L back in because the path was all lowercase i removed my changes...

so I went from:

    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    sieve_dir = /%h/sieve/dovecot.sieve
    #sieve_dir = /%Lh/sieve/dovecot.sieve

to

    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    #sieve_dir = /%h/sieve/dovecot.sieve
    sieve_dir = /%Lh/sieve/dovecot.sieve

and that's where things went pear shaped...

after putting:

sieve_dir = /%h/sieve/dovecot.sieve

back in place filtering is now working again.  So what is the deal with that "%L"??

6

Re: Roundcube filters don't work

It's better to do some basic research with Google:
http://wiki2.dovecot.org/Variables

7

Re: Roundcube filters don't work

Zhang,

thanks but I already did that and the definition of %L found there doesn't explain the behavior I posted about.

it doesn't just change the case of the path to the scripts, it changed the path itself...

8

Re: Roundcube filters don't work

Did you change other Dovecot config files? Please show me file of /etc/dovecot/dovecot-mysql.conf to help troubleshoot (replace password before pasting).

The path shown in your log file looks just fine:

AshcorTech wrote:

Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: script file /data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.19//.dovecot.sieve not found

9

Re: Roundcube filters don't work

ZhangHuangbin wrote:

Did you change other Dovecot config files? Please show me file of /etc/dovecot/dovecot-mysql.conf to help troubleshoot (replace password before pasting).

The path shown in your log file looks just fine:

AshcorTech wrote:

Aug 27 16:25:17 lda(jeff.mckeon@ashcortechnologies.com): Debug: sieve: script file /data/vmail/vmail1/ashcortechnologies.com/j/e/f/jeff.mckeon-2013.08.21.21.18.19//.dovecot.sieve not found

I don't remember changing anything other than the dovecot.conf (but that doesn't mean I didn't)

here is the dovecot-myslq.conf file:

driver = mysql
default_pass_scheme = CRYPT
connect = host=127.0.0.1 dbname=vmail user=vmail password=xxxxxxxxxx
# Required by 'doveadm mailbox ...'.
iterate_query = SELECT username AS user FROM mailbox
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
user_query = SELECT \
    '%u' AS master_user, \
    CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
    CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
FROM mailbox,domain \
WHERE mailbox.username='%u' \
    AND mailbox.domain='%d' \
    AND mailbox.`enable%Ls%Lc`=1 \
    AND mailbox.domain=domain.domain \
    AND domain.backupmx=0 \
    AND domain.active=1 \
    AND mailbox.active=1

10

Re: Roundcube filters don't work

dovecot-mysql.conf looks just fine.