[Dovecot] doveadm index

2011-12-14 Thread Daniel L. Miller
Does "doveadm index -A INBOX" reindex everything?  What about users with 
multiple folders, both subbed & not subbed under INBOX?


--
Daniel


[Dovecot] Building 2.1.rc1 with cluence, but without libstemmer

2011-12-14 Thread Jan Mikkelsen
Hi,

I'm testing out 2.1.rc1, building against clucene 2.3.3.4.

Without libstemmber, the build fails because it attempts to include 
SnowballAnalyzer.h which is not part of "core" clucene.

Simple patch below to make dovecot 2.1.rc1 build with clucene but without 
libstemmer (or textcat).

Looking at libstemmer itself, there are multiple versions. The version in 
clucene is put into libclucene-contribs-lib.so, but that version is older than 
libstemmer_c, which generates libstemmer.a, tested for in the dovecot 2.1.rc1 
configure script. The dovecot code uses SnowballAnalyzer.h as a C++ wrapper 
around libstemmer.

What versions of libstemmer, clucene and libtextcat is dovecot 2.1.rc1 intended 
to be used against?

Is it worth bringing the wrapper class around libstemmer into dovecot to avoid 
funny dependencies against clucene and so that the -lstemmer test in configure 
is enough?

For reference, I'm building on FreeBSD 9.0-RC3, system gcc.

Regards,

Jan Mikkelsen.


diff -u -d -r dovecot-2.1.rc1/src/plugins/fts-lucene/lucene-wrapper.cc 
dovecot-2.1.rc1.patched/src/plugins/fts-lucene/lucene-wrapper.cc
--- dovecot-2.1.rc1/src/plugins/fts-lucene/lucene-wrapper.cc2011-11-09 
08:45:26.0 +1100
+++ dovecot-2.1.rc1.patched/src/plugins/fts-lucene/lucene-wrapper.cc
2011-12-14 23:36:54.319796535 +1100
@@ -23,7 +23,9 @@
#include 
#include 
#include 
+#if defined(HAVE_LUCENE_STEMMER) || defined(HAVE_LUCENE_TEXTCAT)
#include "SnowballAnalyzer.h"
+#endif

/* Lucene's default is 1. Use it here also.. */
#define MAX_TERMS_PER_DOCUMENT 1






[Dovecot] dovecot-antispam: pipe backend with spamc failing to parse args

2011-12-14 Thread Micah Anderson

I'm trying to get the pipe backend to work with the new
dovecot-antispam (I was very pleased to see the new version, thanks
Johannes!)

Before I would run the following over the maildir: 

spamc -d 10.0.1.109 -L ham < $file 2>&1 > /dev/null

now, i'm using dovecot-antispam and mdbox and have the following
configured:

antispam_backend = pipe
antispam_signature = X-Spam-Flag
antispam_signature_missing = error
antispam_trash_pattern = trash;Trash;Deleted *
antispam_spam_pattern_ignorecase = SPAM
antispam_pipe_tmpdir = /var/tmp
antispam_pipe_program_spam_arg = -L spam
antispam_pipe_program_notspam_arg = -L ham
antispam_pipe_program = /usr/bin/spamc
antispam_pipe_program_args = -d 10.0.1.109

Now, when I move a message to Spam, dovecot-antispam detects it and
attempts to run, but it fails:

Dec 14 16:22:45 grosbeak [username 10.0.1.74 uid]: antispam: run program
failed with exit code 64

Exit code 64 is spamc's exit code for "command line usage error" - but I
can't see exactly the command that is being constructed by
dovecot-antispam to know where the error is.

Any ideas?
micah

-- 



pgpvqEZKd1stL.pgp
Description: PGP signature


[Dovecot] Question about index reset in dovecot 2.0.15

2011-12-14 Thread Maria Arrea
I have seen some strange error log messages in our dovecot server (2.0.15, RHEL 
5.7x64, mdbox+zlib, local storage, high load)

 Dec 14 22:01:27 buzon dovecot: imap(fmcarrasco): Error: 
/indices_dovecot/indices/07/47/fmcarrasco/mailboxes/INBOX/dovecot.index reset, 
view is now inconsistent
 Dec 14 22:00:27 buzon dovecot: imap(cfp): Error: 
/indices_dovecot/indices/16/58/cfp/mailboxes/Sent/dovecot.index reset, view is 
now inconsistent
 Dec 14 20:56:46 buzon dovecot: imap(rcam): Error: Corrupted index cache file 
/indices_dovecot/indices/03/6b/rcam/mailboxes/INBOX/dovecot.index.cache: Broken 
virtual size for mail UID 132197
 Dec 14 21:50:38 buzon dovecot: imap(cfp): Error: Recent flags state corrupted 
for mailbox INBOX

 I have been googling without luck, why does this happen? I have tried with 
doveadm force-resync, maybe this could solve this issues.

 doveconf -n output

 # 2.0.15: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.18-274.7.1.el5 x86_64 Red Hat Enterprise Linux Server release 
5.7 (Tikanga) ext4
 auth_cache_negative_ttl = 10 secs
 auth_cache_size = 10 M
 auth_cache_ttl = 2 mins
 auth_master_user_separator = *
 auth_mechanisms = plain login
 auth_worker_max_count = 3500
 base_dir = /var/run/dovecot/
 default_client_limit = 5000
 default_process_limit = 6500
 disable_plaintext_auth = no
 imap_client_workarounds = tb-extra-mailbox-sep delay-newmail tb-lsub-flags
 lda_mailbox_autocreate = yes
 lda_mailbox_autosubscribe = yes
 mail_fsync = never
 mail_gid = entrega
 mail_home = /buzones/domain/%2.26Hn/%2.200Hn/%n/home_usuario/
 mail_location = 
mdbox:/buzones/domain/%2.26Hn/%2.200Hn/%n:INDEX=/indices_dovecot/indices/%2.26Hn/%2.200Hn/%n
 mail_max_userip_connections = 15000
 mail_plugins = " zlib acl quota autocreate"
 mail_uid = entrega
 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
 mdbox_rotate_interval = 1 days
 mdbox_rotate_size = 60 M
 passdb {
 args = /etc/dovecot/dovecot-ldap.conf
 driver = ldap
 }
 passdb {
 args = /etc/usuario_maestro.txt
 driver = passwd-file
 master = yes
 }
 passdb {
 args = /etc/dovecot/dovecot-ldap.conf
 driver = ldap
 }
 plugin {
 acl = vfile
 autocreate = SPAM
 autocreate2 = Sent
 autocreate3 = Drafts
 autocreate4 = Trash
 autosubscribe = SPAM
 autosubscribe2 = Sent
 autosubscribe3 = Drafts
 autosubscribe4 = Trash
 lda_mailbox_autosubscribe = yes
 quota = dict:Cuota de usuario::file:/buzones/cuotas/%n
 quota_rule2 = Trash:storage=+10%%
 quota_warning = storage=90%% aviso_cuota 90 %u
 sieve = /buzones/domain/%2.26Hn/%2.200Hn/%n/home_usuario/dovecot.sieve
 sieve_dir = /buzones/domain/%2.26Hn/%2.200Hn/%n/home_usuario/sieve/
 zlib_save = gz
 zlib_save_level = 9
 }
 pop3_no_flag_updates = yes
 protocols = pop3 imap sieve
 service anvil {
 client_limit = 25000
 }
 service auth {
 client_limit = 28000
 unix_listener auth-master {
 user = entrega
 }
 unix_listener auth-userdb {
 user = entrega
 }
 user = root
 }
 service aviso_cuota {
 executable = script /usr/local/bin/quota-warning.sh
 unix_listener aviso_cuota {
 mode = 0666
 }
 user = entrega
 }
 service imap-login {
 executable = /usr/libexec/dovecot/imap-login
 group = dovenull
 service_count = 0
 vsz_limit = 1 G
 }
 service imap {
 executable = /usr/libexec/dovecot/imap
 process_limit = 6000
 }
 service managesieve-login {
 executable = /usr/libexec/dovecot/managesieve-login
 inet_listener sieve {
 port = 2000
 }
 process_limit = 2000
 vsz_limit = 1 G
 }
 service managesieve {
 executable = /usr/libexec/dovecot/managesieve
 process_limit = 5000
 }
 service pop3-login {
 executable = /usr/libexec/dovecot/pop3-login
 process_limit = 4000
 service_count = 0
 vsz_limit = 1 G
 }
 service pop3 {
 executable = /usr/libexec/dovecot/pop3
 process_limit = 4000
 }
 ssl_ca = 

Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Leonardo Rodrigues

Em 14/12/11 15:52, Nikolaos Milas escreveu:


I think I'll now open a new thread on how to send rich/UTF-8 mail 
warnings.





Probably you just need to format/encode it properly ... no big deal 
on that.




--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Nikolaos Milas

Thank you all for your help.

Changing from:

   unix_listener quota-warning {
   }

to:

   unix_listener quota-warning {
user = vmail
   }

solved the problem!

Now my quota warning message is being sent successfully.

I think I'll now open a new thread on how to send rich/UTF-8 mail warnings.

Thanks again,
Nick




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Backing Up To Windows File Server

2011-12-14 Thread Luigi Rosa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Asai said the following on 14/12/11 17:52:

> Thanks, Luigi, I may fall back to that.

Should you need it, here's the script I use to do it.

In my configurations /var/spool/mail contains one dir for each domain and each
of that dir contains a maildir for each domain. So the email of
foo...@acme.com is in /var/spool/mail/acme.com/foobar/

The 4th line checks lost&found because /bar/spool/mail is a different file 
system.

I create the .tgz file on local /tmp for performance reasons.



TARGET=/backup
for DOMAINPATH in /var/spool/mail/*
do
if [ "${DOMAINPATH}" != "/var/spool/mail/lost+found" ]
then
DOMAIN=`echo $DOMAINPATH | cut -d '/' -f 5`
for USERPATH in ${DOMAINPATH}/*
do
USER=`echo $USERPATH | cut -d '/' -f 6`
tar cvzf /tmp/$DOMAIN-$USER.tgz $USERPATH > /dev/null
cp -f /tmp/$DOMAIN-$USER.tgz $TARGET/mail
rm -f /tmp/$DOMAIN-$USER.tgz
done
fi

done





Ciao,
luigi

- -- 
/
+--[Luigi Rosa]--
\

I don't think we have the right or the wisdom to interfere,
however a planet is evolving.
--James Kirk, "The Omega Glory"
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7o3jYACgkQ3kWu7Tfl6ZSfpQCgvzhOJH6mnJMu8ZzvKu5y8um+
46wAoKd0eXxBNPad9EZao7VKjZBkACer
=dhk0
-END PGP SIGNATURE-


Re: [Dovecot] Backing Up To Windows File Server

2011-12-14 Thread Jerry
On Wed, 14 Dec 2011 10:17:58 -0700
Asai articulated:

> On 12/13/2011 5:34 PM, Jerry wrote:
> > On Tue, 13 Dec 2011 16:21:09 -0700
> > Asai articulated:
> >
> >> Working with dsync and setting up backups to a Windows file server.
> >> Problem seems to be that Windows is renaming the dovecot mail files
> >> (maildir) to Windows friendly filenames, and losing the Dovecot
> >> name. For example,
> >> 1323817925.M36368P32049.triata.globalchangemultimedia.net,S=2255,W=2318:2,S
> >> becomes 1AETPH~X.
> >>
> >> Does anyone have any ideas about how to tell Windows to not do
> >> this? Or is it not possible?
> > I have backed up files to a Windows server before but have never
> > experienced the problems you are describing. Could you please list
> > the Windows Server specifics, ie. version, etc.
> This is a Win 2008 R2 server with NFS shares enabled. I initially
> copied the backups from my former backup server to this Windows box,
> and that's when I noticed the file names had been changed.

IMHO, I think you might be better served by posting your inquiry to a
Microsoft forum dedicated to the 2008 server framework.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__



Re: [Dovecot] Backing Up To Windows File Server

2011-12-14 Thread Asai

On 12/13/2011 5:34 PM, Jerry wrote:

On Tue, 13 Dec 2011 16:21:09 -0700
Asai articulated:


Working with dsync and setting up backups to a Windows file server.
Problem seems to be that Windows is renaming the dovecot mail files
(maildir) to Windows friendly filenames, and losing the Dovecot name.
For example,
1323817925.M36368P32049.triata.globalchangemultimedia.net,S=2255,W=2318:2,S
becomes 1AETPH~X.

Does anyone have any ideas about how to tell Windows to not do this?
Or is it not possible?

I have backed up files to a Windows server before but have never
experienced the problems you are describing. Could you please list the
Windows Server specifics, ie. version, etc.
This is a Win 2008 R2 server with NFS shares enabled. I initially copied 
the backups from my former backup server to this Windows box, and that's 
when I noticed the file names had been changed.




Re: [Dovecot] Autosubscribe new folders

2011-12-14 Thread Dennis Guhl
On Wed, Dec 14, 2011 at 01:49:39PM +0100, For@ll wrote:
> Hi,

[..]

> When I get a new message, in user folder is automaticly created
> folder like subject but is not subscribed. What I must settings in
> dovecot to automaticly subscribe folders to subscriptions files.?

Add

lda_mailbox_autosubscribe = yes

to 15-lda.conf (or wherever you defined lda_mailbox_autocreate = yes).

Dennis


[Dovecot] Autosubscribe new folders

2011-12-14 Thread For@ll

Hi,

I have a sieve filter:

require ["fileinto","reject","body"];

if header :contains "subject" "NOTE"
{
if body :content "application/pdf" :contains "" {
redirect "no...@domena.com";
}
else
{
reject text:
Lack attachment PDF!
.
;
stop;
}
}

When I get a new message, in user folder is automaticly created folder 
like subject but is not subscribed. What I must settings in dovecot to 
automaticly subscribe folders to subscriptions files.?




Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Thomas Leuxner
On Wed, Dec 14, 2011 at 10:33:14AM -0200, Leonardo Rodrigues wrote:

> service quota-warning {
>   executable = script /etc/dovecot/aviso-quota.sh
>   user = dovecot
>   unix_listener quota-warning {
> user = mail
>   }
> }

Right, looks like the Wiki Example needs to be revamped...

[ 90-quota.conf ] matches the real life examples posted:

# Example quota-warning service. The unix listener's permissions should
be
# set in a way that mail processes can connect to it. Below example
assumes
# that mail processes run as vmail user. If you use mode=0666, all
system users
# can generate quota warnings to anyone.
#service quota-warning {
#  executable = script /usr/local/bin/quota-warning.sh
#  user = dovecot
#  unix_listener quota-warning {
#user = vmail
#  }
#}


Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Leonardo Rodrigues

Em 14/12/11 10:24, Patrick Westenberg escreveu:


This is what works for me:

service quota-warning {
  executable = script /usr/local/etc/dovecot/quota-warning.sh
  unix_listener quota-warning {
user = vmail
  }
  user = vmail
}


My configurations are similar to Patrick ones and works just fine:

service quota-warning {
  executable = script /etc/dovecot/aviso-quota.sh
  user = dovecot
  unix_listener quota-warning {
user = mail
  }
}

plugin {
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=85%% quota-warning 85 %u
  quota_warning3 = storage=70%% quota-warning 70 %u
  quota_exceeded_message = Quota excedida (caixa postal cheia) / Quota 
exceeded (mailbox is full)

}




--


Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br

Minha armadilha de SPAM, NÃO mandem email
gertru...@solutti.com.br
My SPAMTRAP, do not email it






Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Patrick Westenberg

Nikolaos Milas schrieb:


No, this did not solve the problem. I changed to vmail

service quota-warning {
executable = script /opt/mail1.sh
user = vmail
unix_listener quota-warning {
}
}


This is what works for me:

service quota-warning {
  executable = script /usr/local/etc/dovecot/quota-warning.sh
  unix_listener quota-warning {
user = vmail
  }
  user = vmail
}


Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Nikolaos Milas

On 14/12/2011 1:06 μμ, Thomas Leuxner wrote:


I'd guess setting the user to 'vmail' here solves the problem


Thank you for the reply.

No, this did not solve the problem. I changed to vmail

   service quota-warning {
   executable = script /opt/mail1.sh
   user = vmail
   unix_listener quota-warning {
   }
   }

and did a full restart:

   # service dovecot restart

Again:
Dec 14 13:30:11 vmail dovecot: lda(tester): Error: quota: 
net_connect_unix(/var/run/dovecot/quota-warning) failed: Permission 
denied (euid=500(vmail) egid=500(v
mail) missing +r perm: /var/run/dovecot/quota-warning, euid is not dir 
owner)


And still, the socket is owned by root:
# ls -la /var/run/dovecot/
total 32
drwxr-xr-x 4 root dovecot 4096 Dec 14 13:20 .
drwxr-xr-x 23 root root 4096 Dec 14 13:27 ..
...
srw--- 1 root root 0 Dec 14 13:20 quota-warning

Any suggestions?

Thanks,
Nick



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] Quota warnings not being sent

2011-12-14 Thread Thomas Leuxner
On Wed, Dec 14, 2011 at 12:47:05PM +0200, Nikolaos Milas wrote:
> For example, in the logs I get:
> Dec 12 08:42:40 vmail dovecot: lda(imaptester): Error: quota:
> net_connect_unix(/var/run/dovecot/quota-warning) failed: Permission
> denied (euid=500(vmail) egid=500(vmail) missing +r perm:
> /var/run/dovecot/quota-warning, euid is not dir owner)

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
  }
}

I'd guess setting the user to 'vmail' here solves the problem:

http://wiki2.dovecot.org/Quota/Configuration

Regards
Thomas


signature.asc
Description: Digital signature


[Dovecot] Quota warnings not being sent

2011-12-14 Thread Nikolaos Milas

Hello,

I am running dovecot-2.0.13-1_128.el5 x86_64 RPM on CentOS 5.7 with the 
config shown below.


All accounts are virtual, hosted on LDAP Server.

My problem is that the quota warning mail is not sent as expected.

For example, in the logs I get:
Dec 12 08:42:40 vmail dovecot: lda(imaptester): Error: quota: 
net_connect_unix(/var/run/dovecot/quota-warning) failed: Permission 
denied (euid=500(vmail) egid=500(vmail) missing +r perm: 
/var/run/dovecot/quota-warning, euid is not dir owner)


Here is /var/run/dovecot/:

# ls -la /var/run/dovecot/
total 32
drwxr-xr-x  4 rootdovecot  4096 Dec  9 21:27 .
drwxr-xr-x 23 rootroot 4096 Dec 14 12:27 ..
srw---  1 rootroot0 Dec  9 21:27 anvil
srw---  1 rootroot0 Dec  9 21:27 anvil-auth-penalty
srw---  1 rootroot0 Dec  9 21:27 auth-client
srw---  1 dovecot root0 Dec  9 21:27 auth-login
srw-rw  1 vmail   vmail   0 Dec  9 21:27 auth-master
srw---  1 rootroot0 Dec  9 21:27 auth-userdb
srw---  1 dovecot root0 Dec  9 21:27 auth-worker
srw---  1 rootroot0 Dec  9 21:27 config
srw---  1 rootroot0 Dec  9 21:27 dict
srw---  1 rootroot0 Dec  9 21:27 director-admin
srw-rw-rw-  1 rootroot0 Dec  9 21:27 dns-client
srw---  1 rootroot0 Dec  9 21:27 doveadm-server
lrwxrwxrwx  1 rootroot   25 Dec  9 21:27 dovecot.conf -> 
/etc/dovecot/dovecot.conf

drwxr-xr-x  2 rootroot 4096 May 17  2011 empty
drwxr-x---  2 rootdovenull 4096 Dec  9 21:27 login
-rw---  1 rootroot5 Dec  9 21:27 master.pid
srw---  1 rootroot0 Dec  9 21:27 quota-warning

Follows my config (at the end of this message).

How should I change permissions to resolve the issue? Would it be enough 
to change ownership of the whole directory /var/run/dovecot/ and its 
contents to vmail:vmail? What configuration directives determine the 
ownership and the access permissions for these sockets?


Please advise.

Thanks in advance,
Nick


--
# 2.0.13: dovecot.conf

protocols = imap pop3

mail_location = maildir:~/Maildir/
mail_gid = 500
mail_uid = 500

auth_mechanisms = plain login
auth_username_format = %Lu
auth_verbose = yes
disable_plaintext_auth = no

mail_plugins = quota

protocol imap {
  imap_client_workarounds = "delay-newmail  "
  mail_plugins = quota imap_quota
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path =
  log_path =
  mail_plugins = quota
  postmaster_address = sysad...@example.com
  sendmail_path = /usr/lib/sendmail
}

userdb {
  args = /etc/dovecot/dovecot-usrdb-ldap.conf
  driver = ldap
}

passdb {
  args = /etc/dovecot/dovecot-passdb-ldap.conf
  driver = ldap
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=4G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = root
  unix_listener quota-warning {
  }
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
  }
  user = root
}

service imap-login {
  service_count = 1
  vsz_limit = 64 M
}

service pop3-login {
  service_count = 1
  vsz_limit = 64 M
}

ssl_ca = 

smime.p7s
Description: S/MIME Cryptographic Signature