1

Topic: Vacation filter (Round Cube)

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

I'm trying to figure out how to use the vacation filter. I have enabled it and yet it doesn't send a reply message out. Is there anything else I'm required to configure? Or, is there another way of enabling it?

Thanks,
Neil

2

Re: Vacation filter (Round Cube)

If someone send you an email, Dovecot will send out an auto-reply message automatically. You can try to send an email to your account from Gmail/Hotmail/Yahoo!/etc.

3

Re: Vacation filter (Round Cube)

That is what I thought, however, it appears as though no auto reply is sent to users who email you. I've tested this myself and it doesn't appear to work or me either.

When looking at the managesieve entry in dovecot.log, it shows that it is disconnecting:
Jul 10 08:50:56 managesieve(email@address.com): Info: Disconnected: Logged out bytes=44/370

Although that is not the case, or shouldn't be I believe.

4

Re: Vacation filter (Round Cube)

Default vacation filter works fine for me, no addition setting/configure is required.
If it doesn't work for you, please turn on debug mode in Dovecot and send one more testing email, try to figure it out why it doesn't work as expected in Dovecot log file (/var/log/dovecot.log and /var/log/sieve.log).

5

Re: Vacation filter (Round Cube)

Jul 11 11:22:58 imap: Debug: Added userdb setting: plugin/master_user=email@address.com
Jul 11 11:22:58 imap(email@address.com): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50/
Jul 11 11:22:58 imap(email@address.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Jul 11 11:22:58 imap(email@address.com): Debug: Quota rule: root=user mailbox=* bytes=2147483648 messages=0
Jul 11 11:22:58 imap(email@address.com): Debug: Quota warning: bytes=1825361100 (85%) messages=0 reverse=no command=quota-warning 85 email@address.com
Jul 11 11:22:58 imap(email@address.com): Debug: Quota warning: bytes=1932735283 (90%) messages=0 reverse=no command=quota-warning 90 email@address.com
Jul 11 11:22:58 imap(email@address.com): Debug: Quota warning: bytes=2040109465 (95%) messages=0 reverse=no command=quota-warning 95 email@address.com
Jul 11 11:22:58 imap(email@address.com): Debug: dict quota: user=email@address.com, uri=proxy::quotadict, noenforcing=0
Jul 11 11:22:58 imap(email@address.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir://var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/:INDEX=//var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/
Jul 11 11:22:58 imap(email@address.com): Debug: maildir++: root=//var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir, index=, control=, inbox=//var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir, alt=
Jul 11 11:22:58 imap(email@address.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
Jul 11 11:22:58 imap(email@address.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox=, alt=
Jul 11 11:22:58 imap(email@address.com): Debug: Namespace : Using permissions from //var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir: mode=0700 gid=-1
Jul 11 11:22:59 imap(email@address.com): Error: open(//var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/cur/1368217606.M256009P28467.mail1.address.local,S=2652338,W=2688693:2,S) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +r perm: //var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/cur/1368217606.M256009P28467.mail1.address.local,S=2652338,W=2688693:2,S, UNIX perms appear ok (ACL/MAC wrong?))
Jul 11 11:22:59 imap(email@address.com): Info: Disconnected: Internal error occurred. Refer to server log for more information. [2013-07-11 11:22:59] bytes=349/83386

It appears that the permissions were wrong. We gave 700  vmail:vmail to directories.

What would recommend? 704? Since it appears that it only requires read perms?

6

Re: Vacation filter (Round Cube)

I changed the permissions and still no auto reply.
I even created a new account so it'd be assigned the correct permissions and it didn't send one out either

7

Re: Vacation filter (Round Cube)

ItZz_Neil wrote:

Jul 11 11:22:59 imap(email@address.com): Error: open(//var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/cur/1368217606.M256009P28467.mail1.address.local,S=2652338,W=2688693:2,S) failed: Permission denied (euid=2000(vmail) egid=2000(vmail) missing +r perm: //var/vmail/vmail1/address/n/e/i/neil-2013.06.04.08.19.50//Maildir/cur/1368217606.M256009P28467.mail1.address.local,S=2652338,W=2688693:2,S, UNIX perms appear ok (ACL/MAC wrong?))

Looks like just this file has incorrect file permission? "missing +r perm", not readable by vmail user?

Folder /var/vmail/ should be set to '0700', owned by vmail:vmail. All sub-folders should has the same permission and ownership.

ItZz_Neil wrote:

I even created a new account so it'd be assigned the correct permissions and it didn't send one out either

Please create a new account, turn on debug mode in Dovecot, then send a testing email, check all related log in Dovecot log files. Paste here if you're not sure what the problem is.

8

Re: Vacation filter (Round Cube)

Here's log after test email. I fixed the permission error yesterday, however, mail still ins't being autoreplied.

Log:
Jul 12 10:55:52 managesieve-login: Info: Login: user=<testing@example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20778, secured
Jul 12 10:55:52 managesieve: Debug: Added userdb setting: plugin/master_user=testing@example.com
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27/
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Quota rule: root=user mailbox=* bytes=1073741824 messages=0
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Quota warning: bytes=912680550 (85%) messages=0 reverse=no command=quota-warning 85 testing@example.com
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Quota warning: bytes=966367641 (90%) messages=0 reverse=no command=quota-warning 90 testing@example.com
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Quota warning: bytes=1020054732 (95%) messages=0 reverse=no command=quota-warning 95 testing@example.com
Jul 12 10:55:52 managesieve(testing@example.com): Debug: dict quota: user=testing@example.com, uri=proxy::quotadict, noenforcing=0
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir://var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir/:INDEX=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir/
Jul 12 10:55:52 managesieve(testing@example.com): Debug: maildir++: root=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir, index=, control=, inbox=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir, alt=
Jul 12 10:55:52 managesieve(testing@example.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
Jul 12 10:55:52 managesieve(testing@example.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox=, alt=
Jul 12 10:55:52 managesieve(testing@example.com): Debug: sieve-storage: using active sieve script path: //var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//sieve/dovecot.sieve
Jul 12 10:55:52 managesieve(testing@example.com): Debug: sieve-storage: using sieve script storage directory: //var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//sieve
Jul 12 10:55:52 managesieve(testing@example.com): Debug: sieve-storage: using permissions from //var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//sieve: mode=0700 gid=-1
Jul 12 10:55:52 managesieve(testing@example.com): Debug: sieve-storage: relative path to sieve storage in active link:
Jul 12 10:55:52 imap-login: Info: Login: user=<testing@example.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20780, secured
Jul 12 10:55:52 imap: Debug: Added userdb setting: plugin/master_user=testing@example.com
Jul 12 10:55:52 imap(testing@example.com): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27/
Jul 12 10:55:52 imap(testing@example.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Jul 12 10:55:52 imap(testing@example.com): Debug: Quota rule: root=user mailbox=* bytes=1073741824 messages=0
Jul 12 10:55:52 imap(testing@example.com): Debug: Quota warning: bytes=912680550 (85%) messages=0 reverse=no command=quota-warning 85 testing@example.com
Jul 12 10:55:52 imap(testing@example.com): Debug: Quota warning: bytes=966367641 (90%) messages=0 reverse=no command=quota-warning 90 testing@example.com
Jul 12 10:55:52 imap(testing@example.com): Debug: Quota warning: bytes=1020054732 (95%) messages=0 reverse=no command=quota-warning 95 testing@example.com
Jul 12 10:55:52 imap(testing@example.com): Debug: dict quota: user=testing@example.com, uri=proxy::quotadict, noenforcing=0
Jul 12 10:55:52 imap(testing@example.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir://var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir/:INDEX=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir/
Jul 12 10:55:52 imap(testing@example.com): Debug: maildir++: root=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir, index=, control=, inbox=//var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir, alt=
Jul 12 10:55:52 imap(testing@example.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/Shared/%u
Jul 12 10:55:52 imap(testing@example.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox=, alt=
Jul 12 10:55:52 imap(testing@example.com): Debug: Namespace : Using permissions from //var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//Maildir: mode=0700 gid=-1
Jul 12 10:55:52 imap(testing@example.com): Info: Disconnected: Logged out bytes=44/537
Jul 12 10:55:52 managesieve(testing@example.com): Info: Disconnected: Logged out bytes=44/370

#removed real domain, obviously#

9

Re: Vacation filter (Round Cube)

ItZz_Neil wrote:

Jul 12 10:55:52 managesieve(testing@example.com): Debug: sieve-storage: using active sieve script path: //var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//sieve/dovecot.sieve

Could you please show us full content of this file (/var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27//sieve/dovecot.sieve)? Just want to see whether we have correct vacation setting in it.

If you have correct vacation setting, Dovecot will send an auto-reply email to sender, the log in /var/log/sieve.log looks like this:

Jul 12 17:52:53 lda(recipient@domain.com): Info: sieve: msgid=<20130713005251.2A4BF101766@u12.iredmail.org>: sent vacation response to <sender@another.com>

And Dovecot will create file /var/vmail/vmail1/example.com/t/e/s/testing-2013.07.11.12.09.27/.dovecot.lda-dupes to track how many times it sent vacation message to individual sender (controlled by ":days" parameter in vacation sieve script).

10 (edited by ItZz_Neil 2013-07-13 09:39:55)

Re: Vacation filter (Round Cube)

require ["vacation","fileinto"];
# rule:[Vacation]
if true
{
        vacation :days 1 :addresses "neil@example.com" :subject "Vacation" "I'm on vacation.";
}
# rule:[Move Spam to Junk Folder]
if false # header :is "X-Spam-Flag" "YES"
{
        fileinto "Junk";
        stop;
}


###I filled all the field in, although I'm pretty sure the address field is not needed

11

Re: Vacation filter (Round Cube)

Your sieve rule looks just fine, no idea yet. Sorry.
Did you modify any Dovecot config files?

12

Re: Vacation filter (Round Cube)

No dovecot config files have been touched at all. They are vanilla from the install.

13

Re: Vacation filter (Round Cube)

ItZz_Neil wrote:

No dovecot config files have been touched at all. They are vanilla from the install.

No log after you sent testing email? That's not expected.

14

Re: Vacation filter (Round Cube)

I do not see the log, ".dovecot.lda-dupes".

Other than the log I poster a few posts up, the Sieve.log has nothing in it related to the testing email.

15

Re: Vacation filter (Round Cube)

No idea at all, it works for me out of box with default iRedMail setting.

16 (edited by ItZz_Neil 2013-07-15 21:02:22)

Re: Vacation filter (Round Cube)

Hmm, that is unfortunate. Can you think of any other possibilities? Possibly a work around or something else that can be implemented to take the default/built-ins place?

Also, I don't think this would make a difference, but we have several virtual interfaces tied into the system.

Thanks,
Neil

17

Re: Vacation filter (Round Cube)

Also, what version of dovecot are you using?

We're on 2.0.18 and have an update pending for the next one.

18

Re: Vacation filter (Round Cube)

Vacation should work out of box with default iRedMail settings. But as you mentioned:

1) you didn't modify any config files
2) your vacation sieve filter is correct
3) No error/warning in Dovecot log file

i really have no idea at all. Could you please paste output of command "dovecot -n" here to help troubleshoot?

19 (edited by ItZz_Neil 2013-07-16 23:48:32)

Re: Vacation filter (Round Cube)

Sure, the output is as follows

# 2.0.18: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-358.6.2.el6.x86_64 x86_64 CentOS release 6.4 (Final)
auth_master_user_separator = *
auth_mechanisms = PLAIN LOGIN
dict {
  acl = mysql:/etc/dovecot/dovecot-share-folder.conf
  expire = db:/var/lib/dovecot/expire/expire.db
  quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
}
first_valid_uid = 2000
last_valid_uid = 2000
listen = *
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = 2000
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_plugins = quota
mail_uid = 2000
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacati                                                                                                                on subaddress comparator-i;ascii-numeric relational regex imap4flags copy includ                                                                                                                e variables body enotify environment mailbox date ihave
namespace {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
namespace {
  list = children
  location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
  prefix = Shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-master-users-password
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  auth_socket_path = /var/run/dovecot/auth-master
  autocreate = INBOX
  autocreate2 = Sent
  autocreate3 = Trash
  autocreate4 = Drafts
  autocreate5 = Junk
  autosubscribe = INBOX
  autosubscribe2 = Sent
  autosubscribe3 = Trash
  autosubscribe4 = Drafts
  autosubscribe5 = Junk
  expire = Trash 7 Trash/* 7 Junk 30
  expire_dict = proxy::expire
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=1G
  quota_warning = storage=85%% quota-warning 85 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  quota_warning3 = storage=95%% quota-warning 95 %u
  sieve = /%Lh/sieve/dovecot.sieve
  sieve_dir = /%Lh/sieve
  sieve_global_dir = /var/vmail/sieve
  sieve_global_path = /var/vmail/sieve/dovecot.sieve
}
protocols = pop3 imap sieve
service auth {
  unix_listener /var/spool/postfix/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0666
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  process_limit = 500
  service_count = 1
}
service pop3-login {
  service_count = 1
}
service quota-warning {
  executable = script /usr/local/bin/dovecot-quota-warning.sh
  unix_listener quota-warning {
    group = vmail
    mode = 0660
    user = vmail
  }
}
ssl = required
ssl_cert = </etc/pki/tls/certs/wildcard_<domain>.pem
ssl_key = </etc/pki/tls/private/wildcard_<domain>.key
userdb {
  args = /etc/dovecot/dovecot-mysql.conf
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  lda_mailbox_autocreate = yes
  log_path = /var/log/sieve.log
  mail_plugins = quota sieve autocreate
  postmaster_address = root
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = quota imap_quota autocreate
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

20

Re: Vacation filter (Round Cube)

I believe the issue might be in the line:
managesieve_sieve_capability = fileinto reject envelope encoded-character vacati                                                                                                                on subaddress comparator-i;ascii-numeric relational regex imap4flags copy includ                                                                                                                e variables body enotify environment mailbox date ihave

It seems to have line breaks and odd spacing in it.

It's not in the dovecot.conf file, where might I edit this?

21

Re: Vacation filter (Round Cube)

ItZz_Neil wrote:

It seems to have line breaks and odd spacing in it.

It's just fine, don't care about this.

You have correct settings in Dovecot (sieve =, sieve_dir smile, vacation extension is supported in sieve, i have no idea yet.
Did you send testing email with Outlook/Thunderbird/Roundcube webmail or just a system command ("mail", for example)?

22

Re: Vacation filter (Round Cube)

I've applied the filter through Roundcube and sent emails to that account via Gmail, Thunderbird, and Roundcube.

Hope this helps.

Thanks,
Neil

23

Re: Vacation filter (Round Cube)

Vacation should be triggered this way. I have no idea at all, sorry.

24 (edited by ItZz_Neil 2013-07-18 21:19:30)

Re: Vacation filter (Round Cube)

Okay, so the issue is fixed now.

Thank you for pointing out the error in the mysql.log:
postfix/proxymap[11778]: warning: table "mysql:/etc/postfix/mysql/transport_maps_domain.cf": empty lookup result for: "<domain>" -- ignored

That led us to find the issue. It had to do with our migration of the mysql database and it using the transport method: "virtual", rather than dovecot.

Once we made the change to the tables the vacation filter began to work.

Thanks,
Neil