Re: [Dovecot] Sieve users script problem.

2012-11-11 Thread Eliezer Croitoru

On 11/11/2012 2:39 AM, Ben Morrow wrote:

 require ["include"];

 include "script1";
 include "script2";

and activate that script.


>Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: include:
>sieve_global_dir is not set; it is currently not possible to include
>`:global' scripts.

It's not clear to me what's happening here: does that script use the
'include :global' command? If you want that to work you will need to
create a system-wide scripts directory and set the sieve_global_dir
parameter to point to it. If OTOH you wanted to include a script from
the user's sieve/ directory, you need to leave off the :global tag.

Ben


Thanks,

Now I kind of understand it but from the documentation it feels like 
there is a default and directory which works always.(Or this what I 
understood)


Since its not like that it makes my options limited but stil this can do 
what I need.


I need it to filter mails into sub-directories for my user only so it's 
fine.


Thanks Again,
Eliezer

--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer  ngtech.co.il


Re: [Dovecot] Sieve users script problem.

2012-11-10 Thread Ben Morrow
At  6PM +0200 on 10/11/12 you (Eliezer Croitoru) wrote:
> I am using Dovecot 2.1.9 which seems to solve older bug in sieve.
> Now I have another problem with users scripts.
> I want dovecot to run users scripts but it seems to not even see them.
> Dovecot runs the default sieve script from home dir but wont see the 
> sieve scripts in the sieve subdirectory and some logs:

Sieve only runs one user-specified sieve script. The other scripts in
the sieve/ directory are alternatives which can be managed and activated
using managesieve. The ~/.dovecot.sieve script should be a symlink to
the currently-activated script in the sieve/ directory, so that
managesieve can change which script is activated.

It is also possible to run other scripts from the sieve/ directory using
the 'include' extension, but you must use the :personal location (or
simply not specify :global, since :personal is the default). If a user
wants to run several scripts in succession I believe the only way
currently is to create a 'master' script which looks like

require ["include"];

include "script1";
include "script2";

and activate that script.

> Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: include: 
> sieve_global_dir is not set; it is currently not possible to include 
> `:global' scripts.

It's not clear to me what's happening here: does that script use the
'include :global' command? If you want that to work you will need to
create a system-wide scripts directory and set the sieve_global_dir
parameter to point to it. If OTOH you wanted to include a script from
the user's sieve/ directory, you need to leave off the :global tag.

Ben



[Dovecot] Sieve users script problem.

2012-11-10 Thread Eliezer Croitoru

I am using Dovecot 2.1.9 which seems to solve older bug in sieve.
Now I have another problem with users scripts.
I want dovecot to run users scripts but it seems to not even see them.
Dovecot runs the default sieve script from home dir but wont see the 
sieve scripts in the sieve subdirectory and some logs:
Nov 10 18:35:54 lda(user@domain.local): Debug: Quota root: name=User 
quota backend=maildir args=
Nov 10 18:35:54 lda(user@domain.local): Debug: Quota rule: root=User 
quota mailbox=* bytes=1073741824 messages=0
Nov 10 18:35:54 lda(user@domain.local): Debug: Quota rule: root=User 
quota mailbox=Trash bytes=+32212254 (3%) messages=0
Nov 10 18:35:54 lda(user@domain.local): Debug: Quota warning: 
bytes=1020054732 (95%) messages=0 reverse=no command=quota-warning 95 
raw mail user
Nov 10 18:35:54 lda(user@domain.local): Debug: Quota warning: 
bytes=214748364 (20%) messages=0 reverse=no command=quota-warning 20 raw 
mail user
Nov 10 18:35:54 lda(user@domain.local): Debug: none: root=, index=, 
control=, inbox=, alt=
Nov 10 18:35:54 lda(user@domain.local): Debug: Destination address: 
eliezer@domain.local (source: user@hostname)
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: include: 
sieve_global_dir is not set; it is currently not possible to include 
`:global' scripts.
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: using the 
following location for user's Sieve script: 
/home/vmail/domain.local/eliezer/home/.dovecot.sieve
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: opening script 
/home/vmail/domain.local/eliezer/home/.dovecot.sieve
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: script binary 
/home/vmail/domain.local/eliezer/home/.dovecot.svbin successfully loaded
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: binary save: not 
saving binary /home/vmail/domain.local/eliezer/home/.dovecot.svbin, 
because it is already stored
Nov 10 18:35:54 lda(user@domain.local): Debug: sieve: executing script 
from /home/vmail/domain.local/eliezer/home/.dovecot.svbin
Nov 10 18:35:54 lda(user@domain.local): Info: sieve: msgid=: 
stored mail into mailbox 'INBOX'


So it recognizes the home sir but wont look at the sieve sub directory.


My dovecot -n output:
# 2.1.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.3.8-gentoo x86_64 Gentoo Base System release 2.0.3 ext3
auth_mechanisms = plain login
dict {
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
first_valid_uid = 5000
last_valid_uid = 5000
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = 5000
mail_location = maildir:/home/vmail/%d/%n/Maildir/
mail_plugins = " quota"
mail_privileged_group = vmail
mail_uid = 5000
namespace {
  inbox = yes
  list = yes
  location =
  prefix =
  separator = .
  subscriptions = yes
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = maildir:User quota
  quota_rule = *:storage=1G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=20%% quota-warning 20 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +include +vnd.dovecot.debug +imapflags +spamtest 
+spamtestplus +relational +comparator-i;ascii-numeric

}
postmaster_address = postmastert@domain.local
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
  }
}
service dict {
  unix_listener dict {
group = vmail
mode = 0600
user = vmail
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
service quota-warning {
  executable = script /etc/dovecot/quota-warning.sh
  user = vmail
}
ssl_ca =