[Dovecot] IMAP clients suddenly redownload folder headers

2009-09-17 Thread Brent Bloxam
We had an issue today with IMAP clients (Thunderbird, Outlook) having to 
redownload headers for folders. This issue was eerily close to a MySQL 
database structure change that shouldn't have affected any related 
queries, however we did notice an event of user CPU % not being reported 
via SNMP around the same time for the server. There are no entries in 
our dovecot error log around the outage.


We're running Dovecot 1.1.13 with MySQL being used for user and password 
queries, and Maildir for storage on a fibre channel SAN. However, it is 
possible for some stores to be on an NFS mount (supporting legacy during 
migration), which is why there is the nfs options in the below config.


I'm wondering if someone could shed light on what could cause this to 
occur. I imagine it's related to the index cache's, but the lack of any 
mention in the error logs has me puzzled.


Output of dovecot -n:

# 1.1.13: /usr/local/etc/dovecot.conf
# OS: FreeBSD 7.0-RELEASE i386
base_dir: /var/run/dovecot
log_path: /var/log/dovecot-error.log
info_log_path: /var/log/dovecot-info.log
protocols: imap pop3
ssl_disable: yes
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
mail_max_userip_connections: 100
first_valid_uid: 89
mail_privileged_group: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
lock_method: dotlock
mail_executable(default): /usr/local/libexec/dovecot/rawlog 
/usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/rawlog 
/usr/local/libexec/dovecot/imap

mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %f
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  mechanisms: plain apop
  cache_size: 10240
  cache_negative_ttl: 30
  username_format: %Lu
  passdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  userdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf


Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Timo Sirainen
Nope. Probably wouldn't be difficult to implement, but it's a pretty  
low priority for me..


On Sep 17, 2009, at 9:30 PM, Darvin Denmian wrote:


Timo,

I know this plugin, but instead of removing the messages I need to
move them to a specific folder,can it do this?

Thanks.

On Thu, Sep 17, 2009 at 4:11 PM, Timo Sirainen  wrote:

On Sep 17, 2009, at 7:28 PM, Darvin Denmian wrote:


Is there a way to automatically expurge or move messages from a
specific folder to another folder after "X" days?


http://wiki.dovecot.org/Plugins/Expire








Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Darvin Denmian
Timo,

I know this plugin, but instead of removing the messages I need to
move them to a specific folder,can it do this?

Thanks.

On Thu, Sep 17, 2009 at 4:11 PM, Timo Sirainen  wrote:
> On Sep 17, 2009, at 7:28 PM, Darvin Denmian wrote:
>
>> Is there a way to automatically expurge or move messages from a
>> specific folder to another folder after "X" days?
>
> http://wiki.dovecot.org/Plugins/Expire
>
>


Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Timo Sirainen

On Sep 17, 2009, at 7:28 PM, Darvin Denmian wrote:


Is there a way to automatically expurge or move messages from a
specific folder to another folder after "X" days?


http://wiki.dovecot.org/Plugins/Expire



Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Darvin Denmian
Will this solution works even if I had a lot of messages or subfolders?
Will this index update take much time?

Thanks !

On Thu, Sep 17, 2009 at 2:36 PM, Andrew Schulman
 wrote:
>> Is there a way to automatically expurge or move messages from a
>> specific folder to another folder after "X" days?
>
> I use a daily cron job for this.  It runs a script that deletes messages
> more than 6 months old from the Junk folder.
>
> If you can do this directly in Dovecot, then I guess that's better, because
> it will keep the folder indexes up to date.  But I move messages around
> outside of Dovecot and it works fine.  Dovecot updates the indexes when I
> view the folder, and there's not much delay.
>
> A.
>
>


Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Andrew Schulman
> Is there a way to automatically expurge or move messages from a
> specific folder to another folder after "X" days?

I use a daily cron job for this.  It runs a script that deletes messages
more than 6 months old from the Junk folder.

If you can do this directly in Dovecot, then I guess that's better, because
it will keep the folder indexes up to date.  But I move messages around
outside of Dovecot and it works fine.  Dovecot updates the indexes when I
view the folder, and there's not much delay.

A.



Re: [Dovecot] Move to a Specific Folder

2009-09-17 Thread Eduardo M KALINOWSKI

On Qui, 17 Set 2009, Darvin Denmian wrote:

Is there a way to automatically expurge or move messages from a
specific folder to another folder after "X" days?

Where "X" specifies the amount of days that messages in folder will be kept.


If it's maildir, you can use find(1) to search the messages and mv(1)  
them to another folder.


The next time the folders are opened dovecot will update the indexes.


--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br



[Dovecot] Move to a Specific Folder

2009-09-17 Thread Darvin Denmian
Is there a way to automatically expurge or move messages from a
specific folder to another folder after "X" days?

Where "X" specifies the amount of days that messages in folder will be kept.

Thanks !


Re: [Dovecot] Move SPAM into SPAM folder

2009-09-17 Thread Pascal Volk
On 09/17/2009 06:54 PM Jose Luis Marin Perez wrote:
> Dear Sirs,
> 
> I need to know how can I automatically move all emails that are considered as 
> SPAM to a specific directory called SPAM.
> 
> The server has installed Dovecot + Qmail + Vpopmail + Simscan + Spamassassin 
> + ClamAV.
> 
> dovecot -n
> …

I'd suggest to use Dovecots LDA (deliver) with the cmu_sieve plugin.
http://wiki.dovecot.org/LDA/Qmail
http://wiki.dovecot.org/LDA/Sieve#SpamAssassin_tagged_mail_filtering


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.0926...@localdomain.org


[Dovecot] Move SPAM into SPAM folder

2009-09-17 Thread Jose Luis Marin Perez

Dear Sirs,

I need to know how can I automatically move all emails that are considered as 
SPAM to a specific directory called SPAM.

The server has installed Dovecot + Qmail + Vpopmail + Simscan + Spamassassin + 
ClamAV.

dovecot -n

# 1.1.16: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final)
log_path: /var/log/dovecot.log
listen: *:10143
ssl_listen: *:10943
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_plugins: quota
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  passdb:
driver: checkpassword
args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
  userdb:
driver: prefetch
args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u
plugin:
  quota: maildir
  quota_rule: ?:storage=0
  quota_rule2: Trash:ignore

Thanks

Jose Luis
  
_
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

Re: [Dovecot] Dovecot and LDAP-Quotas

2009-09-17 Thread south africa
Hi Timo,

I solved the problem.

The problem was the right order in dovecot.conf. "userdb ldap" should stand in 
front of "userdb static".

Greetings




--- t...@iki.fi wrote:

From: Timo Sirainen 
To: southafr...@thedoghousemail.com
Cc: Dovecot Mailing List 
Subject: Re: [Dovecot] Dovecot and LDAP-Quotas
Date: Tue, 25 Aug 2009 09:20:52 -0400

On Tue, 2009-08-25 at 04:08 -0700, south africa wrote:
> Aug 25 11:51:18 auth(default): Info: client in: AUTH1   PLAIN   
> service=pop3secured lip=123.456.789.72  rip=192.168.1.2
> lport=995   rport=1984
> Aug 25 11:51:18 auth(default): Info: client out: CONT   1
> Aug 25 11:51:18 auth(default): Info: client in: CONT1   
> Aug 25 11:51:18 auth(default): Info: client out: OK 1   user=testuser
> Aug 25 11:51:18 auth(default): Info: master in: REQUEST 1   21237   1
> Aug 25 11:51:18 auth(default): Info: master out: USER   1   testuser   
> uid=500 gid=500 home=/home/vmail/testuser

It says nothing about LDAP here, which means that unless you filtered
out some lines it's not using LDAP at all for anything. What does your
dovecot -n output show now?









_
Get your FREE TheDoghouseMail email address at http://www.thedoghousemail.com


Re: [Dovecot] Secondary groups from ldap

2009-09-17 Thread Ian Levesque

On Sep 16, 2009, at 9:16 PM, Timo Sirainen wrote:


On Sep 16, 2009, at 5:18 AM, Ian Levesque wrote:

I'm trying to configure my user_attrs using LDAP as the userdb so  
that dovecot knows what secondary groups a user is a member of. The  
LDAP backend is an Open Directory implementation, which stores  
secondary group affiliations as memberUid attributes in  
cn=groupname,cn=groups,dc=dns,dc=name,dc=server.


Do you mean memberGid? Also is it only secondary groups, the primary  
group is somewhere else?


No, the way that OD handles secondary group affiliations is through a  
"groups" cn that lists "memberUid"s that are in the group. I've seen  
LDAP implementations that provide secondary group IDs in the "user"  
cn, which is indeed a lot easier to query.




With ldapsearch, my query would be:

ldapsearch -x -b cn=groups,dc=dns,dc=name,dc=server  
"(memberUid=ian)" cn


Is this possible to configure in Dovecot?



Hmm. Looking at the code if you do:

user_attrs = memberGid=gid

then it should set "gid=123,345,456" field. You could verify that  
this gets returned by setting auth_debug=yes. But .. I can't really  
see where that code would actually be used, since it looks like only  
the first GID is actually used. Try anyway how far you can get. :)


Well, if dovecot doesn't use secondary groups, maybe I'm  
misunderstanding a problem we're having. Basically, I'm trying to  
configure a shared mailbox. The two users sharing the mailbox are in  
the same secondary group. The mailbox itself is 770 but the users  
can't access the mailbox, and dovecot complains:


	stat(/path/to/.mailbox/tmp) failed: Permission denied (euid=2637 
(username) egid=20(staff) missing +x perm: /path/to/.mailbox)


$ ls -al /path/to/.mailbox
.archive -> /path/to/shared/.mailbox

$ ls -ald /path/to/shared/.mailbox
drwxrwx--- 5 root tech 172 Sep 16 11:10 /path/to/shared/.mailbox

I assumed this is because dovecot's not recognizing the secondary  
group "tech" properly, did I misinterpret the error?


Best,
Ian