[Dovecot] lda sieve error using global after sieve script

2010-11-19 Thread Tim Traver
Hi all,

ok, so I've implemented an after sieve script with the following line 
in the plugins area :

sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve

It seems to work ok on some accounts, but then I'm getting the following
error in the deliver error log for many accounts :

Error: sieve: script /home/mailboxes/sieve/to_spam_folder.sieve failed
with unsuccessful implicit keep

here is the script :

require [fileinto];
# rule:[Spam and Virus Tag]
if anyof (header :contains Subject [VIRUS-TAG],
header :contains Subject [SPAM-TAG])
{
fileinto Spam;
stop;
}

which is a very basic script that files stuff into the spam folder. I've
checked some of the accounts, and the folder is there, and all appears
to be ok...

I'm not sure if its a compiling error or something, and I'm not sure if
that error message means the message didn't even get delivered anywhere.
it sounds like it gets discarded...does it?

any help would be appreciated.





here is my dovecot -n :

[r...@mda1 /local/logs]# dovecot -n
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 7.0-STABLE i386
auth_username_format = %Lu
auth_username_translation = %@
auth_verbose = yes
dotlock_use_excl = yes
first_valid_uid = 100
listen = *
lock_method = dotlock
log_path = /local/logs/dovecot.errors
mail_fsync = always
mail_gid = 100
mail_location = maildir:%h/Maildir
mail_nfs_index = yes
mail_nfs_storage = yes
mail_uid = 100
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 imapflags notify
mmap_disable = yes
passdb {
  args = /bin/checkpassword_dovecot_auth
  driver = checkpassword
}
plugin {
  quota = maildir
  sieve = ~/.dovecot.sieve
  sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve
  sieve_dir = ~/Maildir/sieve
  sieve_extensions = +notify +imapflags
}
protocols = none
quota_full_tempfail = yes
service auth {
  unix_listener auth-userdb {
group = sn
mode = 0600
user = sn
  }
}
ssl = no
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /bin/checkpassword_dovecot_deliver
  driver = checkpassword
}
verbose_proctitle = yes
protocol lda {
  info_log_path = /local/logs/dovecot-deliver.log
  log_path = /local/logs/dovecot-deliver-errors.log
  mail_plugins = quota sieve
}
protocol imap {
  mail_plugins = quota imap_quota
}
protocol sieve {
  managesieve_sieve_capability = comparator-i;ascii-numeric fileinto
reject vacation imapflags notify include envelope body relational regex
subaddress copy
}
protocol pop3 {
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}



Re: [Dovecot] Doveadm

2010-11-19 Thread Alex Baule
Hi Timo

I have a doubt about the doveadm.

It's use the plugins too ? if have a plugin using in IMAP, it's use this
same plugin to do the work (ex expurge, copy,etc) using the hooked rewrited
functions ? Or i need to explict add some configuration in doveadm ?


2010/11/18 Alex Baule alexwba...@gmail.com

 Tks timo!

 I will take a look in this socket to use it with my schedule.

 Em 18/11/2010 16:48, Timo Sirainen t...@iki.fiescreveu:

 On Thu, 2010-11-18 at 16:21 -0200, Alex Baule wrote:
  I will create a schedule to expurge older ema...
 Yes, in that case the dates are looked up from dovecot.index.cache
 files.


  Maybe i will create a application that makes a pipe to doveadm and call
 it
  to do the job.
 BTW. It's possible to talk to doveadm server as well via unix/tcp
 sockets. By default there is $base_dir/doveadm-server unix socket.





Re: [Dovecot] dsync mbox-mdbox II: highest_modseq changed

2010-11-19 Thread Axel Thimm
Hi,

On Thu, 2010-11-18 at 17:34 +, Timo Sirainen wrote:
 On Thu, 2010-11-18 at 18:57 +0200, Axel Thimm wrote:
 
  dsync(athimm): Info: old/speicher: highest_modseq changed: 1 != 10
  dsync(athimm): Info: root/root-heretic: highest_modseq changed: 1 != 10
  dsync(athimm): Info: lists/ccrma.stanford.edu/planetccrma: highest_modseq 
  changed: 11 != 14 
 
 These don't really matter. It just couldn't sync the modseqs correctly.
 I should try to fix those somehow some day, but I think the problem here
 is that mbox code can't handle this correctly. It should have increased
 the modseqs to 10, 10, 14 but apparently it didn't.

Shouldn't it be the other way? mbox was the source, so its modseq should
had been considered authoritative, or not? One would expect that after
applying the (same) changes to mdbox that the modseq should converge to
be the same.

I'm just trying to understand whether the bug may be in the mdbox part
of the code. On another note I now switched to mdbox with bzip
compressed storage and everything seems nice and smooth. The server has
a much lower load when I connect and even the client I'm using
(evolution) which would previously crash due to timeouts is now working
much better (though still crashing, but that's not really related to
dovecot). The storage requirements have more than halved (15GB vs 34GB)
and are much easier to rsync/backup. I love mdbox. :)
-- 
http://thimm.gr/ - http://ATrpms.net/


signature.asc
Description: This is a digitally signed message part


[Dovecot] Workaround for evolution?

2010-11-19 Thread Axel Thimm
Hi,

evolution has a bug when it comes to closing and IDLE' connection:

https://bugzilla.gnome.org/show_bug.cgi?id=628515

evolution does not send a DONE command, and dovecot properly answers
with an error. evolution ignores this and seems to wait on another
response.

Timo, do you think there could be a setting for tolerating missing
DONEs? Thanks!
-- 
http://thimm.gr/ - http://ATrpms.net/


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] lda sieve error using global after sieve script

2010-11-19 Thread Tim Traver
I may have found the issue myself.

It looks like the line before that error line is the quota error that
looks something like this :
 Quota exceeded (mailbox for user is full)

so, that brings the question as to what happens to this email? Does the
dovecot lda bounce it?

Thanks,

Tim.


On 11/19/2010 6:26 AM, Tim Traver wrote:
 Hi all,

 ok, so I've implemented an after sieve script with the following line 
 in the plugins area :

 sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve

 It seems to work ok on some accounts, but then I'm getting the following
 error in the deliver error log for many accounts :

 Error: sieve: script /home/mailboxes/sieve/to_spam_folder.sieve failed
 with unsuccessful implicit keep

 here is the script :

 require [fileinto];
 # rule:[Spam and Virus Tag]
 if anyof (header :contains Subject [VIRUS-TAG],
 header :contains Subject [SPAM-TAG])
 {
 fileinto Spam;
 stop;
 }

 which is a very basic script that files stuff into the spam folder. I've
 checked some of the accounts, and the folder is there, and all appears
 to be ok...

 I'm not sure if its a compiling error or something, and I'm not sure if
 that error message means the message didn't even get delivered anywhere.
 it sounds like it gets discarded...does it?

 any help would be appreciated.





 here is my dovecot -n :

 [r...@mda1 /local/logs]# dovecot -n
 # 2.0.7: /usr/local/etc/dovecot/dovecot.conf
 # OS: FreeBSD 7.0-STABLE i386
 auth_username_format = %Lu
 auth_username_translation = %@
 auth_verbose = yes
 dotlock_use_excl = yes
 first_valid_uid = 100
 listen = *
 lock_method = dotlock
 log_path = /local/logs/dovecot.errors
 mail_fsync = always
 mail_gid = 100
 mail_location = maildir:%h/Maildir
 mail_nfs_index = yes
 mail_nfs_storage = yes
 mail_uid = 100
 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 imapflags notify
 mmap_disable = yes
 passdb {
   args = /bin/checkpassword_dovecot_auth
   driver = checkpassword
 }
 plugin {
   quota = maildir
   sieve = ~/.dovecot.sieve
   sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve
   sieve_dir = ~/Maildir/sieve
   sieve_extensions = +notify +imapflags
 }
 protocols = none
 quota_full_tempfail = yes
 service auth {
   unix_listener auth-userdb {
 group = sn
 mode = 0600
 user = sn
   }
 }
 ssl = no
 ssl_cert = /etc/ssl/certs/dovecot.pem
 ssl_key = /etc/ssl/private/dovecot.pem
 userdb {
   driver = prefetch
 }
 userdb {
   args = /bin/checkpassword_dovecot_deliver
   driver = checkpassword
 }
 verbose_proctitle = yes
 protocol lda {
   info_log_path = /local/logs/dovecot-deliver.log
   log_path = /local/logs/dovecot-deliver-errors.log
   mail_plugins = quota sieve
 }
 protocol imap {
   mail_plugins = quota imap_quota
 }
 protocol sieve {
   managesieve_sieve_capability = comparator-i;ascii-numeric fileinto
 reject vacation imapflags notify include envelope body relational regex
 subaddress copy
 }
 protocol pop3 {
   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
 }



Re: [Dovecot] Restarting dovecot-auth stops authentication

2010-11-19 Thread Attila Nagy

On 11/16/10 14:40, Attila Nagy wrote:
The Dovecot wiki states that Dovecot's master restarts all died 
processes, which is good for availability. But when I kill 
dovecot/auth (to simulate an error condition which happened on a 
machine), the authentication fails with:
Nov 16 14:32:40 be dovecot: imap: Error: net_connect_unix(auth-master) 
failed: No such file or directory

Of course I forgot to tell it's 2.0.6.
BTW, sending SIGUSR2 to dovecot/auth doesn't lot anything, while sending 
SIGHUP logs the clearing cache message. The wiki says on USR2 it 
should log cache statistics.


Re: [Dovecot] lda sieve error using global after sieve script

2010-11-19 Thread Timo Sirainen
On Fri, 2010-11-19 at 11:13 -0800, Tim Traver wrote:
 I may have found the issue myself.
 
 It looks like the line before that error line is the quota error that
 looks something like this :
  Quota exceeded (mailbox for user is full)
 
 so, that brings the question as to what happens to this email? Does the
 dovecot lda bounce it?

Depends on a setting:

# If user is over quota, return with temporary failure instead of
# bouncing the mail.
#quota_full_tempfail = no




Re: [Dovecot] Doveadm

2010-11-19 Thread Timo Sirainen
On Fri, 2010-11-19 at 15:15 -0200, Alex Baule wrote:
 Hi Timo
 
 I have a doubt about the doveadm.
 
 It's use the plugins too ?

Yes, just like all other Dovecot processes, as long as you keep the
mail_plugins setting global (instead of e.g. inside protocol imap {}).

 if have a plugin using in IMAP, it's use this
 same plugin to do the work (ex expurge, copy,etc) using the hooked rewrited
 functions ? Or i need to explict add some configuration in doveadm ?

As long as doveconf mail_plugins shows your plugin there, it's used.




Re: [Dovecot] dsync mbox-mdbox II: highest_modseq changed

2010-11-19 Thread Charles Marcus
On 2010-11-19 1:40 AM, Axel Thimm wrote:
 The storage requirements have more than halved (15GB vs 34GB)
 and are much easier to rsync/backup. I love mdbox. :)

Hi Axel,

Are you using SiS? Or was this just due to having far fewer tiny files
wasting blocks (or however that works)?

-- 

Best regards,

Charles


[Dovecot] 2.0 hg build failing...

2010-11-19 Thread Ralf Hildebrandt
From the make output:

libtool: link: gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -Wstrict-aliasing=2 -Wl,--as-needed -o .libs/auth
auth.o auth-cache.o auth-client-connection.o auth-master-connection.o
mech-otp-skey-common.o mech-plain-common.o auth-penalty.o
auth-request.o auth-request-handler.o auth-settings.o auth-stream.o
auth-worker-client.o auth-worker-server.o db-checkpassword.o db-sql.o
db-passwd-file.o main.o mech.o mech-anonymous.o mech-plain.o
mech-login.o mech-cram-md5.o mech-digest-md5.o mech-external.o
mech-gssapi.o mech-ntlm.o mech-otp.o mech-skey.o mech-rpa.o
mech-apop.o mech-winbind.o passdb.o passdb-blocking.o passdb-bsdauth.o
passdb-cache.o passdb-checkpassword.o passdb-passwd.o
passdb-passwd-file.o passdb-pam.o passdb-shadow.o passdb-sia.o
passdb-vpopmail.o passdb-sql.o passdb-static.o userdb.o
userdb-blocking.o userdb-checkpassword.o userdb-nss.o userdb-passwd.o
userdb-passwd-file.o userdb-prefetch.o userdb-static.o
userdb-vpopmail.o userdb-sql.o db-ldap.o passdb-ldap.o userdb-ldap.o
-Wl,--export-dynamic  libpassword.a ../lib-ntlm/libntlm.a
../lib-otp/libotp.a ../../src/lib-sql/.libs/libsql.a
../../src/lib-dovecot/.libs/libdovecot.so -lcrypt -lpam -ldl -lrt
-Wl,-rpath -Wl,/usr/dovecot-2/lib/dovecot
auth-penalty.o: In function auth_penalty_anvil_callback':
/usr/src/dovecot-2.0/dovecot-2.0/src/auth/auth-penalty.c:73: undefined 
reference to anvil_client_is_connected'
collect2: ld returned 1 exit status
make[3]: *** [auth] Error 1
make[3]: Leaving directory /usr/src/dovecot-2.0/dovecot-2.0/src/auth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /usr/src/dovecot-2.0/dovecot-2.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory /usr/src/dovecot-2.0/dovecot-2.0'
make: *** [all] Error 2

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] 2.0 hg build failing...

2010-11-19 Thread Timo Sirainen
On 19.11.2010, at 20.33, Ralf Hildebrandt wrote:

 /usr/src/dovecot-2.0/dovecot-2.0/src/auth/auth-penalty.c:73: undefined 
 reference to anvil_client_is_connected'

Oh, forgot to commit that part. Fixed.



Re: [Dovecot] dsync mbox-mdbox II: highest_modseq changed

2010-11-19 Thread Timo Sirainen
On 19.11.2010, at 6.40, Axel Thimm wrote:

 dsync(athimm): Info: old/speicher: highest_modseq changed: 1 != 10
 dsync(athimm): Info: root/root-heretic: highest_modseq changed: 1 != 10
 dsync(athimm): Info: lists/ccrma.stanford.edu/planetccrma: highest_modseq 
 changed: 11 != 14 
 
 These don't really matter. It just couldn't sync the modseqs correctly.
 I should try to fix those somehow some day, but I think the problem here
 is that mbox code can't handle this correctly. It should have increased
 the modseqs to 10, 10, 14 but apparently it didn't.
 
 Shouldn't it be the other way? mbox was the source, so its modseq should
 had been considered authoritative, or not? One would expect that after
 applying the (same) changes to mdbox that the modseq should converge to
 be the same.

The problem is that modseqs can't shrink. Also once modseqs are enabled, 
whenever something changes the modseqs always increase. With mbox you didn't 
have modseqs enabled, so highest_modseq=1 at the beginning of dsync. But dsync 
enables modseqs and so it can't preserve the modseq=1 for destination, because 
each change increases it.. It would of course be possible to delay enabling 
modseqs or maybe not enable them at all, but that's a lot more extra 
complexity..

Re: [Dovecot] Doveadm

2010-11-19 Thread Alex Baule
Tks timo, my plugin is under imap and pop protocol, i will put it in global
conf.

The syntax for doveadm in socket, is the same as the doveadm app?

Ex. Doveadm expurge -u user mailbox inbox savedbefore 3w

Than i create a connection to unix socket and write in socket the expunge
-u user mailbox inbox savedbefore 3w

I made a small socket program, doing this but it doesnt work...

Tks Timo

Em 19/11/2010 18:16, Timo Sirainen t...@iki.fiescreveu:

On Fri, 2010-11-19 at 15:15 -0200, Alex Baule wrote:
 Hi Timo

 I have a doubt about the dov...
Yes, just like all other Dovecot processes, as long as you keep the
mail_plugins setting global (instead of e.g. inside protocol imap {}).


 if have a plugin using in IMAP, it's use this
 same plugin to do the work (ex expurge, copy,etc...
As long as doveconf mail_plugins shows your plugin there, it's used.


Re: [Dovecot] Doveadm

2010-11-19 Thread Timo Sirainen
On 19.11.2010, at 22.18, Alex Baule wrote:

 The syntax for doveadm in socket, is the same as the doveadm app?
 
 Ex. Doveadm expurge -u user mailbox inbox savedbefore 3w

Yes, but use tabs instead of spaces for separating parameters.



Re: [Dovecot] Doveadm

2010-11-19 Thread Alex Baule
Tks timo! Monday i will do all corrections!

Em 19/11/2010 22:26, Timo Sirainen t...@iki.fiescreveu:

On 19.11.2010, at 22.18, Alex Baule wrote:

 The syntax for doveadm in socket, is the same as the d...
Yes, but use tabs instead of spaces for separating parameters.


Re: [Dovecot] IMAP aggregation and MUPDATE protocolo

2010-11-19 Thread Timo Sirainen
On 16.11.2010, at 11.20, Ernesto Revilla Derksen wrote:

 http://www.cyrusimap.org/mediawiki/index.php/Cyrus_Murder_Design
 
 and found it very interesting.
 
 Anyone did something similar based on:
 http://tools.ietf.org/html/rfc3656

I remember there used to be a guy who was planning on implementing it for 
Dovecot and actually make it compatible with Cyrus so that both could be used 
in the same Murder setup, but that was years ago.

I'm not too interested in that though.



Re: [Dovecot] Managesieve + procmail

2010-11-19 Thread Lox
2010/11/9 Stan Hoeppner s...@hardwarefreak.com

 Read this thread:

 http://www.virtualmin.com/node/11460


Hello,

Thank you that was usefull. But I still can't get it working 

It seems Dovecot's LDA  is not using uid and guid from my userdb file to
deliver to user inbox (located in /var/mail)

I get:

dovecot: deliver(virtuser_537): file_dotlock_create(/var/mail/virtuser_537)
failed: Permission denied (euid=537(virtuser_537) egid=518(neaevents)
missing +w perm: /var/mail) (set mail_privileged_group=mail)

dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-25-server x86_64 Ubuntu 10.04.1 LTS
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
ssl_ca_file: /etc/dovecot/ca.pem
ssl_cert_file: /etc/dovecot/server.crt
ssl_key_file: /etc/dovecot/server.key
ssl_cipher_list:
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
mail_privileged_group: mail
mail_location: mbox:~/mail:LAYOUT=maildir
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): autocreate
mail_plugins(imap): autocreate
mail_plugins(pop3):
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): outlook-idle delay-newmail
tb-extra-mailbox-sep
imap_client_workarounds(imap): outlook-idle delay-newmail
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
lda:
  postmaster_address: postmaster
  mail_plugins: sieve
  quota_full_tempfail: yes
  deliver_log_format: msgid=%m: %$
  rejection_reason: Your message to %t was automatically rejected:%n%r
auth default:
  mechanisms: plain login
  passdb:
driver: passwd-file
args: /etc/dovecot/dovecot.passwd
  userdb:
driver: passwd-file
args: /etc/dovecot/dovecot.passwd
  userdb:
driver: prefetch
  socket:
type: listen
client:
  path: /var/spool/postfix/private/dovecot-auth
  mode: 432
  user: postfix
  group: postfix
plugin:
  autocreate: Trash
  autocreate2: Junk
  autocreate3: Sent
  autocreate4: Drafts
  autocreate5: Archives
  autosubscribe: Trash
  autosubscribe2: Junk
  autosubscribe3: Sent
  autosubscribe4: Drafts
  autosubscribe5: Archives
  sieve: ~/.dovecot.sieve
  sieve_dir: ~/sieve

And /etc/procmailrc:

DELIVER=/usr/lib/dovecot/deliver -c
/etc/dovecot/conf.d/01-dovecot-postfix.conf -n
LOGFILE=/var/log/procmail.log
VERBOSE=on
HOME= $HOME
DROPPRIVS=yes

:0 w
| $DELIVER

Regards.

-- 
Lox
lox@knc.nc