Re: [Dovecot] Temporary forbid some users login ?

2012-02-01 Thread Joseba Torre

El 01/02/12 06:55, Frank Bonnet escribió:

hello

is there a way to forbid SOME ( not all ) users's login with dovecot 2 ?
I need to move their IMAP folders to another place with more
disk space but I don't want to stop dovecot IMAP service for
the other users as the moving process will be a bit long ( 1 Tb to move )


thanks


Take a look to conf.d/auth-deny.conf.ext

You can setup a new passdb (a passwd-file can do it) with deny = yes, 
and add/remove users to that passwd-file as needed.


[Dovecot] Can anyone tell me quick, if the howto on dovecot.org is actual:

2012-02-01 Thread Marko Weber


Is this Howto 
http://wiki2.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL

actual also for Dovecot 2.x ?
Cause i read Dovecot 1.x in the Howto

Thank you for any hints / tipps

Marko
(from cold Hamburg Harbour)



Re: [Dovecot] Can anyone tell me quick, if the howto on dovecot.org is actual:

2012-02-01 Thread Jonathan Siegle

Marko Weber said the following on 2/1/12 7:11 AM:


Is this Howto
http://wiki2.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL
actual also for Dovecot 2.x ?
Cause i read Dovecot 1.x in the Howto

Thank you for any hints / tipps

My gut feeling is version 1.2 because it was last modified on 2010-06-29 
11:37:39(see bottom of page) which is in the 1.2 
days(http://www.dovecot.org/oldnews.html).


-Jonathan



smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] Doubts about dsync, mdbox, SIS

2012-02-01 Thread Jan-Frode Myklebust
I've been running continous dsync backups of our Maildirs for a few
weeks now, with the destination dsync server using mdbox and SIS. The
idea was that the destination server would act as a warm copy of 
all our active users data.

The active servers are using Maildir, and has:

$ df -h /usr/local/atmail/users/
FilesystemSize  Used Avail Use% Mounted on
/dev/atmailusers   14T   12T  2.2T  85% /usr/local/atmail/users
$ df -hi /usr/local/atmail/users/
FilesystemInodes   IUsed   IFree IUse% Mounted on
/dev/atmailusers145M113M 33M   78% 
/usr/local/atmail/users

very little of this is compressed (zlib plugin enabled during christmas).

I'm surprised that the destination server is so large, was expecting zlib and
mdbox and SIS would compress it down to much less than what we're seeing 
(12TB - 5TB):

$ df -h /srv/mailbackup
FilesystemSize  Used Avail Use% Mounted on
/dev/mapper/mailbackupvg-mailbackuplv
  5.7T  4.8T  882G  85% /srv/mailbackup

Lots and lots of the attachement storage is duplicated into identical files,
instead of hard linked.

When running doveadm purge -u $user, we're seeing lots of 

Error: 
unlink(/srv/mailbackup/attachments/c3/17/c317b32b97688c16859956f11b803e3bba434349-057274283bb51f4f917ebf34f6ab)
 failed: No such file or directory

/srv/mailbackup/attachments/c3/17/c317b32b97688c16859956f11b803e3bba434349-057274283bb51f4f917ebf34f6ab
 is
missing, but there are 205 other copies of this file named
/srv/mailbackup/attachments/c3/17/c317b32b97688c16859956f11b803e3bba434349-* 
with
identical sha1sum.

Also we see corrupted indexes during the purge. This makes me quite uncertain
if dsync is a workable backup solution.. or if we can trust mdboxes.  

Also on the source side, during dsync, we see too many problems. Some samples:

Error: Mailboxes don't have unique GUIDs: 
08b46439069d3d4db049e671bf84 is shared by INBOX and INBOX
Error: command BOX-LIST failed
Error: Worker server's mailbox iteration failed
Error: read() from worker server failed: EOF

Error: Failed to sync mailbox INBOX.ferie 2006.: Invalid mailbox name
Error: read() from proxy client failed: EOF

Error: Unexpected finish reply: 1  596fec275888dbd89f6d1f5356c22db6 
   37200   \dsync-expunged 0
Error: Unexpected reply from server: 1 
12200572a70726fca946da6f9378dc0337210   \dsync-expunged 0

Error: Failed to sync mailbox INBOX.INBOX.Gerda: Mailbox doesn't exist: 
INBOX/Gerda
Error: command BOX-LIST failed

Error: read() failed: Broken pipe
Panic: file dsync-worker-local.c: line 1678 
(local_worker_save_msg_continue): assertion failed: (ret == -1)
Error: Raw backtrace: /usr/lib64/dovecot/libdovecot.so.0 [0x367703c680] 
- /usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x35) 
[0x367703c765] - /usr/lib64/dovecot/libdovecot.so.0 [0x367703bb93] - 
/usr/bin/dsync [0x40f48d] - /usr/bin/dsync [0x40f589] - 
/usr/bin/dsync(dsync_worker_msg_save+0x8e) [0x40eb3e] - /usr/bin/dsync 
[0x40d71a] - /usr/bin/dsync [0x40cdbf] - /usr/bin/dsync [0x40d105] - 
/usr/lib64/dovecot/libdovecot.so.0(io_loop_call_io+0x48) [0x3677047278] - 
/usr/lib64/dovecot/libdovecot.so.0(io_loop_handler_run+0xd5) [0x36770485c5] - 
/usr/lib64/dovecot/libdovecot.so.0(io_loop_run+0x2d) [0x367704720d] - 
/usr/lib64/dovecot/libdovecot.so.0(master_service_run+0x13) [0x3677035a83] - 
/usr/bin/dsync(main+0x71e) [0x406c4e] - 
/lib64/libc.so.6(__libc_start_main+0xf4) [0x3e3941d994] - /usr/bin/dsync 
[0x406369]


Do you have any idea for what our problems might be? Should we:

avoid SIS ?
avoid doing Maildir on one side and mdbox on the other?
try other dovecot version for dsync?
anything else?


   -jf

- destination server, running dovecot v2.0.14 
mail_attachment_dir = /srv/mailbackup/attachments
mail_location = mdbox:~/mdbox
mail_plugins = zlib
mdbox_rotate_size = 5 M
namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  driver = static
}
plugin {
  zlib_save = gz
  zlib_save_level = 9
}
protocols = 
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener auth-userdb {
mode = 0600
user = mailbackup
  }
}
ssl = no
userdb {
  args = home=/srv/mailbackup/%256Hu/%d/%n
  driver = static
}
-/destination server 


  -jf


Re: [Dovecot] Can anyone tell me quick, if the howto on dovecot.org is actual:

2012-02-01 Thread Marko Weber



Thank you,
i ask because in the first Part is written:

At the time of writing this document we use these versions of the 
required software (probably newer versions also usable):


CentOS 4.4 (or RHEL 4 update 4 or Fedora 6)
Apache 2.0.52
PHP 5.1.6
MySQL 5.0.22
Dovecot 1.0rc15

And i think , config syntax and organisation of config changed alot 
from 1.x to 2.x , or ?



Am 01.02.2012 13:18, schrieb Charles Marcus:

On 2012-02-01 7:11 AM, Marko Weber we...@zackbummfertig.de wrote:


Is this Howto 
http://wiki2.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL

actual also for Dovecot 2.x ?


wiki2. stuff is for dovecot 2.x...

wiki. stuff is for dovecot 1.x...





[Dovecot] http://xi.rename-it.nl/debian/dists/stable-auto/dovecot-2.1.patched/

2012-02-01 Thread Papp Tamas

hi!

What does patched mean in this repo?

Does anybody know?


Thank you,
tamas


Re: [Dovecot] http://xi.rename-it.nl/debian/dists/stable-auto/dovecot-2.1.patched/

2012-02-01 Thread Stephan Bosch

Op 2/1/2012 1:40 PM, Papp Tamas schreef:

hi!

What does patched mean in this repo?

Does anybody know?


This is the v2.1 repository that includes unstable development patches:

http://hg.rename-it.nl/dovecot-2.1-patches/
http://hg.rename-it.nl/pigeonhole-0.3-patches/

These are mostly meant for some side-projects I am working on. 
Previously, some of these patches were included in the normal automatic 
builds, making debugging difficult since `tainted' dovecot sources were 
used. The patches also caused a few rather stupid bugs. Therefore, as I 
announced in a mail a few months back,  I started a separate builder for 
testing these patches. So far, there is no reason for anyone except me 
to install and try these. Just use the normal dovecot-2.1 repository as 
documented in the wiki.


Regards,

Stephan.


Re: [Dovecot] http://xi.rename-it.nl/debian/dists/stable-auto/dovecot-2.1.patched/

2012-02-01 Thread Papp Tamas

On 02/01/2012 01:56 PM, Stephan Bosch wrote:

Op 2/1/2012 1:40 PM, Papp Tamas schreef:

hi!

What does patched mean in this repo?

Does anybody know?


This is the v2.1 repository that includes unstable development patches:

http://hg.rename-it.nl/dovecot-2.1-patches/
http://hg.rename-it.nl/pigeonhole-0.3-patches/

These are mostly meant for some side-projects I am working on. 
Previously, some of these patches were included in the normal 
automatic builds, making debugging difficult since `tainted' dovecot 
sources were used. The patches also caused a few rather stupid bugs. 
Therefore, as I announced in a mail a few months back,  I started a 
separate builder for testing these patches. So far, there is no reason 
for anyone except me to install and try these. Just use the normal 
dovecot-2.1 repository as documented in the wiki.


OK, thank you.

tamas


[Dovecot] locking problem

2012-02-01 Thread myron
I have one user who can't read his e-mail. The /var/log/mail.log file  
has this statement.


dovecot: IMAP(user): Timeout while waiting for lock for transaction  
log file /users/user/mail/.imap/INBOX/dovecot.index.log


I tried killing the imap daemons and removing the lock file,
but it keeps coming back. Any idea what else to do?

This is the dovecot file:

dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-28-server x86_64 Ubuntu 10.04.3 LTS
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
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
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/mail/%u
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_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
auth default:
 mechanisms: plain login
 passdb:
   driver: pam
 userdb:
   driver: passwd
 socket:
   type: listen
   client:
 path: /var/spool/postfix/private/auth-client
 mode: 432
 user: postfix
 group: postfix

--myron
=
Myron Kowalski
MoCoSIN Network/Systems Administrator
Moravian College
my...@moravian.edu
(610) 861-1441






Re: [Dovecot] Temporary forbid some users login ?

2012-02-01 Thread Gregory Finch
On 2012-01-31 9:55 PM, Frank Bonnet wrote:
 hello

 is there a way to forbid SOME (  not all ) users's login with dovecot 2 ?
 I need to move their IMAP folders to another place with more
 disk space but I don't want to stop dovecot IMAP service for
 the other users as the moving process will be a bit long ( 1 Tb to move )


 thanks

http://wiki2.dovecot.org/PasswordDatabase/ExtraFields

see nologin

-Greg



signature.asc
Description: OpenPGP digital signature


[Dovecot] Uncompressing dboxes

2012-02-01 Thread Lauri Alanko

Hello.

I have an mdbox directory that has been created with the zlib plugin  
active, using bzip2 compression. I would now like to convert these  
into uncompressed mdbox format. How do I do this? I have tried  
unsetting all zlib-related configuration options, but dsync still  
produces compressed mdbox at the other end, too.


I guess I could convert to mbox, and then back to mdbox, but for  
certain reasons I'm not very enthusiastic about doing anything  
mbox-related with dovecot any more.


(Incidentally, it's a bit funny that when the zlib plugin is enabled,  
dsync automatically creates compressed dboxes, and even compressed  
maildirs (which is pretty useless), but not compressed mboxes,  
although that's where compression would be most beneficial.)


Thanks,


Lauri




[Dovecot] doveadm altmove fails to pack messages?

2012-02-01 Thread Lauri Alanko

Hello again.

When I use doveadm altmove, I notice that it may result in some very  
small storage files in either the primary or the alternate storage  
location. I'm not quite sure, but it almost seems like every storage  
file that contains messages to be moved is simply split into two  
parts, even if a part might only contain a single message.


This seems quite curious, since the idea of mdbox is after all to  
store as many messages in a single file as fits in mdbox_rotate_size,  
and dovecot-lda can quite successfully append messages to existing  
storage files. So why can't doveadm altmove? Is this the expected  
behavior, or is there something wrong with my setup?


Thanks again,


Lauri




Re: [Dovecot] Temporary forbid some users login ?

2012-02-01 Thread /dev/rob0
On Wed, Feb 01, 2012 at 12:55:44PM +0100, Joseba Torre wrote:
 El 01/02/12 06:55, Frank Bonnet escribió:
 
 is there a way to forbid SOME ( not all ) users's login with 
 dovecot 2 ? I need to move their IMAP folders to another place 
 with more disk space but I don't want to stop dovecot IMAP
 service for the other users as the moving process will be a
 bit long ( 1 Tb to move )
 
 Take a look to conf.d/auth-deny.conf.ext
 
 You can setup a new passdb (a passwd-file can do it) with deny
 = yes, and add/remove users to that passwd-file as needed.

Heh, funny, three different answers in this thread and AFAICT they 
are all correct to some extent.

I think the passdb { deny=yes } is the best answer. I implemented 
this in SQL using a tri-state active column. Standard active=1 
means the MTA accepts mail and the user can login. active=0 will 
disable both. The third state, active=-1 has the MTA continuing to 
accept mail, but triggers my deny=yes passdb.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:


Re: [Dovecot] Uncompressing dboxes

2012-02-01 Thread Timo Sirainen
On 1.2.2012, at 17.43, Lauri Alanko wrote:

 I have an mdbox directory that has been created with the zlib plugin active, 
 using bzip2 compression. I would now like to convert these into uncompressed 
 mdbox format. How do I do this? I have tried unsetting all zlib-related 
 configuration options, but dsync still produces compressed mdbox at the other 
 end, too.

Do something like:

dsync backup dsync -o plugin/zlib_save= -o mail=mdbox:/tmp/uncompressed

 (Incidentally, it's a bit funny that when the zlib plugin is enabled, dsync 
 automatically creates compressed dboxes, and even compressed maildirs (which 
 is pretty useless), but not compressed mboxes, although that's where 
 compression would be most beneficial.)

Dovecot supports only read-only compressed mboxes. Also compressed mboxes are 
always pretty slow, since there's no way to quickly jump around in the file (to 
go to offset X, you need to uncompress the first X bytes of the mbox file, 
that's one reason why for mdbox I decided against using full file compression).



Re: [Dovecot] locking problem

2012-02-01 Thread Timo Sirainen
On 1.2.2012, at 16.09, myron wrote:

 I have one user who can't read his e-mail. The /var/log/mail.log file has 
 this statement.
 
 dovecot: IMAP(user): Timeout while waiting for lock for transaction log 
 file /users/user/mail/.imap/INBOX/dovecot.index.log
 
 I tried killing the imap daemons and removing the lock file,
 but it keeps coming back. Any idea what else to do?
..
 mail_location: mbox:~/mail:INBOX=/var/mail/%u

How large is the /var/mail/user mbox file?



Re: [Dovecot] Issues w/ Apple devices after migration to dovecot

2012-02-01 Thread Timo Sirainen
On 1.2.2012, at 9.48, Armistead, Kurt wrote:

 On Wed, February 1, 2012 12:33 am, Timo Sirainen wrote:
 On 1.2.2012, at 1.16, Armistead, Kurt wrote:
 
 Recently we've moved our old (and I mean _really_ old) mailserver to a
 new
 hardware. Since I had quite some time on my hands, I decided to switch
 from courier to dovecot. Transition went pretty smoothly and the users
 experienced just a few hours' blackout.
 
 Only trouble now is that, after re-configuring some IOS handsets and
 tablets, not all messages are displayed correctly.
 
 Did you use the courier-dovecot-migrate.pl script? If not, Dovecot set new
 IMAP UIDVALIDITY and UID numbers to mails and the problems are most likely
 related to clients not realizing that they should drop their internal
 caches.
 
 I sure did and it reported no issues.

Then I have no idea. Clients shouldn't have noticed any differences between old 
and new server. If you find a bug in something from Dovecot's side, let me know.



Re: [Dovecot] Renaming user account / mailbox

2012-02-01 Thread Timo Sirainen
On 31.1.2012, at 14.07, Nikolaos Milas wrote:

 I am running dovecot-2.0.13-1_128.el5 x86_64 RPM on CentOS 5.7.
 
 I would like to rename userx with email: us...@example.com to 
 u...@example.com with a mailbox of ux (currently: userx)
 
 Of course the idea is that new mail will continue to be delivered to the same 
 mailbox, although it has been renamed.
 
 How can I achieve it? Would it be enough (after changing the associated data 
 in the associated LDAP entry) to simply rename the virtual user directory 
 name, e.g. from /home/vmail/userx to /home/vmail/ux ?

Yes, you can just kill the user's existing connections, rename the directory 
and update the LDAP entry. If you do all of that quickly in a script, it's 
unlikely that you'll run into trouble. If a mail is being delivered at the same 
time, it could tempfail but will be retried again. (A more complex method would 
be using dsync, but probably not worth the trouble.)



Re: [Dovecot] LMTP : Can't handle mixed proxy/non-proxy destinations

2012-02-01 Thread Timo Sirainen
On 30.1.2012, at 11.24, Alexis Lelion wrote:

 Maybe you could work around it so that LMTP always proxies the mails, to
 localhost as well, but to a different port which doesn't do proxying at all.
 Actually this was my first try, but I had proxying loops because
 unlike for IMAP, the LMTP server doesn't seem to support 'proxy_maybe'
 option yet, does it?

Dovecot v2.1 supports it.



Re: [Dovecot] converting from mbox to maildir ?

2012-02-01 Thread Timo Sirainen
On 30.1.2012, at 10.37, Frank Bonnet wrote:

 We are planning to convert our mailhub ( freebsd 7.4 ) from mbox
 format to maildir format.

I'd do it one user at a time with dsync, but unfortunately:

 the machine use real users thru openldap ( pam_ldap + nss_ldap )

nss_ldap can't store the mail_location override field needed to distinguish 
mbox user from maildir user. Maybe you could temporarily switch to some other 
userdb, which would allow extra fields. Also this requires that you deliver 
mails using dovecot-lda/lmtp.

 another problem is disk space. The users's email data takes about
 2 Terabytes of data and I cannot duplicate as I only have 3 Tb on
 the raid array of the server.

With one-user-at-a-time conversion this wouldn't be an issue.



Re: [Dovecot] question of different type of Mailbox

2012-02-01 Thread Timo Sirainen
On 30.1.2012, at 4.37, ml wrote:

 I just migrate my emails from one type of Maildir to Mailbox 
 I did as I was having problems reading speed with my webmail. 
 I did it in order to optimize when do you
 
 my current config work for me

What's the question here? Anyway, mdbox should be faster than either maildir or 
mbox.



Re: [Dovecot] locking problem

2012-02-01 Thread myron


On Feb 1, 2012, at 3:24 PM, Timo Sirainen wrote:


On 1.2.2012, at 16.09, myron wrote:

I have one user who can't read his e-mail. The /var/log/mail.log  
file has this statement.


dovecot: IMAP(user): Timeout while waiting for lock for  
transaction log file /users/user/mail/.imap/INBOX/dovecot.index.log


I tried killing the imap daemons and removing the lock file,
but it keeps coming back. Any idea what else to do?

..

mail_location: mbox:~/mail:INBOX=/var/mail/%u


How large is the /var/mail/user mbox file?



-rw--- 1 user mail 15M 2012-02-01 14:46 /var/mail/user

Can I just zero out the 3 files in that directory.

6240 Jan 31 13:26 dovecot.index
165888 Jan 31 14:39 dovecot.index.cache
 25100 Jan 31 14:42 dovecot.index.log



Re: [Dovecot] IMAP to Maildir Migration preserving UIDs?

2012-02-01 Thread Timo Sirainen
On 30.1.2012, at 5.29, Gedalya wrote:

 The old system uses the message filename for UIDL, but we need to migrate via 
 IMAP in order to preserve IMAP info and UIDs (which have nothing to do with 
 the POP3 UIDL in this case). So I've just finished writing a script to insert 
 X-UIDL headers, and pop3_reuse_xuidl is doing the job.

You could also store the UIDL to dovecot-uidlist file directly without keeping 
it in header.

 Question: Since the system currently serves in excess of 10 pop3 connections 
 per second, would there be any performance gain from using pop3_save_uidl? 
 Would it be faster or slower to fetch the UIDL list from the uidlist rather 
 than look up the X-UIDL in the index? Just wondering.

Currently with pop3_reuse_xuidl=yes setting the X-UIDL header is cached to 
dovecot.index.cache file. With pop3_save_uidl=yes I doubt you'd get much of a 
performance improvement, but if it enables you to later set pop3_reuse_xuidl=no 
you can delete all of the dovecot.index.cache files for pop3-only users, since 
they don't really need it.

 Also, what order does dovecot return the UIDLs in?

The messages are in the same order as in dovecot-uidlist. That of course isn't 
necessarily the same ordering as in your POP3 server. If you directly add the 
UIDLs to dovecot-uidlist file in migration script you can also change the UIDL 
ordering in v2.0.13+:

+ pop3: Added support for showing messages in POP3 order, which can 
  be different from IMAP message order. This can be useful for
  migrations from other servers. Implemented it for Maildir as 'O'
  field in dovecot-uidlist.




Re: [Dovecot] IMAP to Maildir Migration preserving UIDs?

2012-02-01 Thread Gedalya

On 02/01/2012 03:46 PM, Timo Sirainen wrote:

On 30.1.2012, at 5.29, Gedalya wrote:


The old system uses the message filename for UIDL, but we need to migrate via 
IMAP in order to preserve IMAP info and UIDs (which have nothing to do with the 
POP3 UIDL in this case). So I've just finished writing a script to insert 
X-UIDL headers, and pop3_reuse_xuidl is doing the job.

You could also store the UIDL to dovecot-uidlist file directly without keeping 
it in header.


Question: Since the system currently serves in excess of 10 pop3 connections 
per second, would there be any performance gain from using pop3_save_uidl? 
Would it be faster or slower to fetch the UIDL list from the uidlist rather 
than look up the X-UIDL in the index? Just wondering.

Currently with pop3_reuse_xuidl=yes setting the X-UIDL header is cached to 
dovecot.index.cache file. With pop3_save_uidl=yes I doubt you'd get much of a 
performance improvement, but if it enables you to later set pop3_reuse_xuidl=no 
you can delete all of the dovecot.index.cache files for pop3-only users, since 
they don't really need it.


Also, what order does dovecot return the UIDLs in?

The messages are in the same order as in dovecot-uidlist. That of course isn't 
necessarily the same ordering as in your POP3 server. If you directly add the 
UIDLs to dovecot-uidlist file in migration script you can also change the UIDL 
ordering in v2.0.13+:

+ pop3: Added support for showing messages in POP3 order, which can
  be different from IMAP message order. This can be useful for
  migrations from other servers. Implemented it for Maildir as 'O'
  field in dovecot-uidlist.



Thank you so much! This clears up a lot of fine details.



[Dovecot] Site-wide configurable Sieve

2012-02-01 Thread Gedalya

Hi,

I need some sieve actions to be specified per-user, but exposing actual 
sieve scripts to users is of the question.


For example, I need to be able to either put spam messages into a spam 
folder, or discard them, based on user preference. Presumably this would 
be done using Sieve. As I understand, it's not possible to query a 
database from within a sieve script.


If I can't use a single global script, I can imagine automatically 
generating per-user scripts when settings are saved in a GUI (e.g. 
webmail) and store them on the dovecot machine. This would work but I 
would love to hear if someone has a smarter, more robust idea.


Thanks,

Gedalya



Re: [Dovecot] locking problem

2012-02-01 Thread Timo Sirainen
On 1.2.2012, at 22.43, myron wrote:

 dovecot: IMAP(user): Timeout while waiting for lock for transaction log 
 file /users/user/mail/.imap/INBOX/dovecot.index.log
 How large is the /var/mail/user mbox file?
 
 
 -rw--- 1 user mail 15M 2012-02-01 14:46 /var/mail/user

OK, so not very big.

 Can I just zero out the 3 files in that directory.
 
 6240 Jan 31 13:26 dovecot.index
 165888 Jan 31 14:39 dovecot.index.cache
 25100 Jan 31 14:42 dovecot.index.log

You can delete them, but somehow I doubt that helps.. That error message anyway 
happens when a session has opened the mbox and is syncing it. This normally 
is a pretty fast operation, but the error message indicates that another 
session saw the first session doing it for over 3 minutes until it aborted.

Do you have hanging imap processes eating 100% CPU? That could explain it if 
Dovecot doesn't like something in the mbox file. Also there may have been some 
other reasons for this that are already fixed in newer versions.



Re: [Dovecot] Doubts about dsync, mdbox, SIS

2012-02-01 Thread Alessio Cecchi

Il 01/02/2012 13:29, Jan-Frode Myklebust ha scritto:

I've been running continous dsync backups of our Maildirs for a few
weeks now, with the destination dsync server using mdbox and SIS. The
idea was that the destination server would act as a warm copy of
all our active users data.


How many users there are in this installation?


The active servers are using Maildir, and has:

$ df -h /usr/local/atmail/users/
FilesystemSize  Used Avail Use% Mounted on
/dev/atmailusers   14T   12T  2.2T  85% /usr/local/atmail/users
$ df -hi /usr/local/atmail/users/
FilesystemInodes   IUsed   IFree IUse% Mounted on
/dev/atmailusers145M113M 33M   78% 
/usr/local/atmail/users

very little of this is compressed (zlib plugin enabled during christmas).


This is the old storage in Maildir format?


I'm surprised that the destination server is so large, was expecting zlib and
mdbox and SIS would compress it down to much less than what we're seeing
(12TB -  5TB):

$ df -h /srv/mailbackup
FilesystemSize  Used Avail Use% Mounted on
/dev/mapper/mailbackupvg-mailbackuplv
   5.7T  4.8T  882G  85% /srv/mailbackup


This is the new storage in mdbox format?

What size you would expect?
--
Alessio Cecchi is:
@ ILS - http://www.linux.it/~alessice/
on LinkedIn - http://www.linkedin.com/in/alessice
Assistenza Sistemi GNU/Linux - http://www.cecchi.biz/
@ PLUG - ex-Presidente, adesso senatore a vita, http://www.prato.linux.it
@ LOLUG - Socio http://www.lolug.net