Re: [Dovecot] help writeing rule for preventin spam

2009-01-30 Thread Sophia Alikhani

Hi
I suddely could preventing of entering spam . I added zen.spamhaus.org to
rblsmtpd to my qmail-smtpd/run file and now it works well.

-- 
with regards
Sophia Alikhani
WorkPhone: +98-21-8497057
Mobile : +98-912-3361036


[Dovecot] Script: Moving Maildirs between servers

2009-01-30 Thread Peter Lindgren

Hi,
I just migrated from dovecot 1.0.rc29 to 1.1.7, from Sparc platform to
Intel, it went very well.
In the process I merged folders and excluded folders from being copied.
User rights on folders were kept/set.
I thought I'd share my migration script with you folks. If there's an
interest to put it on the wiki I can do that, but I'm not sure in what
page.
Use it as a starter if you need to do this yourselves.
Prerequisites:
 * User names are local unix accounts
 * Old server's /home must be mounted with nfs
 * Structure and user names must match between the two systems
 * Source dovecot must be at least version 1.0.x
 * Destination dovecot must be 1.1.x
 * Only dovecot data folders and files are copied, neither dovecot
indices nor Sieve scripts etc.

Here it goes, have fun!
/Peter


#!/bin/sh
#
# Migrates dovecot Maildir folders and settings from older dovecot on
# old server to new dovecot on new server.
# Prerequisites:
# * User names are local unix accounts
# * Old server's /home must be mounted with nfs
# * Structure and user names must match between the two systems
# * Source dovecot must be at least version 1.0.x
# * Destination dovecot must be 1.1.x
# * Only dovecot data folders and files are copied, neither dovecot indices nor 
Sieve scripts etc.
#
# Originally created by Peter Lindgren 
# Use this script at your own risk. No warranties whatsoever, of any kind!

# Basic settings: The first one you must definitely change, it's where you have 
mounted the old server's home:
SOURCEBASE=/mnt/casiopea-home
DESTBASE=/home

# Just an abbreviation:
MD=Maildir

# Change field separator, for find's sake as there might be folders with spaces:
# (doesn't play well together with the for loop otherwise)
OLDIFS=${IFS}
IFS='
'

# User loop:
# Depending on your source system's setup,
# you probably have non-interactive users with home directories (one of them
# is probably named _dovecot) that shall not be copied. Edit the username
# exclusion list according to your needs.
#
for username in `ls $SOURCEBASE`; do
{
  # This is your username exclude list:
  case $username in (maildir|_dovecot) continue;; esac

  # Here starts the real work:
  SOURCEDIR=$SOURCEBASE/$username/$MD
  DESTDIR=$DESTBASE/$username/$MD
  echo ""
  echo "Copying user "$username"..."
  echo "From "$SOURCEDIR" to "$DESTDIR":"

  # IMAP Folder loop:
  # Will create the Maildir folder too, the first echo $SOURCEDIR"/." does 
that. This way all the copying is in one place only.
  for sourceimap in `{ echo $SOURCEDIR"/." ; find $SOURCEDIR -type d -name \.\* 
-maxdepth 1 -print ; } | sort -f`; do
  {
# Folder exlusion and special actions:
# .Draft is replaced by .Drafts, so content of .Draft must be copied to 
.Drafts.
# (Probably there were a client in use for a while that used .Draft instead 
of .Drafts.)
# Junk mail folders with various names from clients using different 
languages shall not be copied.
# .Trash shall not be copied either.
# Folder .INBOX is a leftover from earlier versions of dovecot, and shall 
not be copied either.
# Add your own exceptions to the list. Be sure to quote spaces and dots.
basename=`basename $sourceimap`
action=copy
case $basename in (\.Junk|\.Junk\ E-mail|\.Correo\ electr\&APM-nico\ no\ 
deseado|\.Skr\&AOQ-ppost|\.Trash|\.INBOX) action=skip;; esac
echo -n "$basename" "$action"
if [ $action"X" == copy"X" ]; then
{
  echo -n ":"
  destname=$basename

  # Merge contents of .Draft and .Drafts to .Drafts:
  if [ $basename"X" == .Draft"X" ]; then destname=${destname}"s"; fi

  destimap=${DESTDIR}/${destname}
  # If this is the Maildir folder (.), a clean desination name is needed 
for mkdir:
  if [ $basename"X" == ."X" ]; then destimap=${DESTDIR}; fi

  mkdir -m 700 "${destimap}"
  echo -n "."
  chown ${username} "${destimap}"
  echo -n "."
  chmod go-rx "${destimap}"
  echo -n "."
  cp -p  "${sourceimap}/dovecot-uidlist"  "${destimap}"
  echo -n "."
  cp -p  "${sourceimap}/dovecot-keywords" "${destimap}"
  echo -n "."
  cp -pR "${sourceimap}/cur" "${destimap}"
  echo -n "."
  cp -pR "${sourceimap}/new" "${destimap}"
  echo -n "."
  cp -pR "${sourceimap}/tmp" "${destimap}"
  echo " done."
}
else
{
  echo ""
}
fi
  }; done
  # Copy root folder files last in user loop, since the Maildir is created in 
the imap loop above:
  cp -p $SOURCEDIR/subscriptions $DESTDIR
  echo "User "${username}" done."
}; done

IFS=${OLDIFS}





--
Peter Lindgren
http://www.norrskenkonsult.com




Re: [Dovecot] Concurrent POP3 Sessions Issues

2009-01-30 Thread Brandon Lamb
On Fri, Jan 30, 2009 at 4:39 AM, Mauricio López Riffo
 wrote:
> Timo,
>
>What messages should be see?  I execute the commands and shows a lot
> of messages, i dont know what it means, i m not a programmer :)
>
>
> Thanks
>
> 
>
> Mauricio López Riffo
> Red Hat Certified Engineer
> 804006455319519
> Netline Telecomunicaciones Chile
> Los Conquistadores 2430, Providencia, Santiago.
> Codigo Postal: 7530041
> Fono: +562 6560600
> Móvil: +569 90992366
>
>> -Mensaje original-
>> De: Timo Sirainen [mailto:t...@iki.fi]
>> Enviado el: jueves, 29 de enero de 2009 20:46
>> Para: mauricio.lo...@netline.net; Dovecot Mailing List
>> Asunto: Re: [Dovecot] Concurrent POP3 Sessions Issues
>>
>> On Jan 29, 2009, at 1:17 PM, Mauricio López Riffo wrote:
>>
>> > I have problems with dovecot + ldap + nfs, we could't have more than
>> > 20 concurrent sessions of pop3, when user 21 comes, the auth process
>> > takes more than 1 sec and is incresing (while most users arrives, more
>> > delay in
>> > autenticacion exists) and my customers complaint about the service.
>> > We need
>> > support about 200 concurrents pop3 users, here is my details
>>
>> Someone else was recently complaining about the same thing. Or was it you?
> Anyway,
>> dovecot-auth doesn't know how many users are logged in so if the problem
> really is 21
>> *concurrent users* instead of n logins/ second, I find it highly unlikely
> that the problem is
>> with authentication.
>>
>> My guess is that this has something to do with NFS. Perhaps start Dovecot
> with strace -tt -f
>> dovecot and then when it's slowing down see what syscall it says is
> blocking.

I had the same kind of issues. Moving dovecot to the nfs server
directly solved all my weird problems.


Re: [Dovecot] problem with some mailboxes (failed: Is a directory)

2009-01-30 Thread Timo Sirainen

On Jan 30, 2009, at 5:24 AM, mi...@x.org.pl wrote:


There is one workaround I know which is:
rm /var/spool/mail/imap/user/username/Maildir/dovecot.index*

Delete the Sent* directory.


Seems like there used to be any software or exadmin which created  
those

directories. I can not find out the source of it. I'm thinking about
deleting all those but I am wondering if Maildir specification does  
allow

any subdirectories in new/cur/tmp?


tmp/ doesn't matter, but everything in new/ and cur/ is supposed to be  
a message, no directories.




Re: [Dovecot] dovecot-1.2-managesieve "make install" ignores Dovecot's prefix

2009-01-30 Thread Stephan Bosch

Steffen Kaiser wrote:
I'm trying to compile dovecot-1.2-managesieve from hg repo with Dovecot 
v1.2 and I found that managesieve uses another "install" target/prefix 
than I've configured in Dovecot.


Is this intentional?
This behavior is taken from the v1.1 cmusieve plugin package. Therefore, 
one must fully specify the necessary parameters for ./configure.


Because you must specify the compiled Dovecot sources, is managesieve 
just "loosly" connected to Dovecot so it would survive a Dovecot (minor) 
update, or do I need to compile managesieve each time as well?
It will work, but the daemons will complain about version differences, 
unless you set version_ignore=yes.


If I need to compile each time, managesive should default to install 
into the same directory than Dovecot, shouldn't it?
I tend to agree, but I am not sure how to achieve this appropriately 
(i.e. without using some kind of hideous hack). I will give this a look.


Regards,

Stephan.


[Dovecot] Dovecot on Mac - Entourage cannot fetch emails

2009-01-30 Thread Bijo

Hi,

Dovecot 1.1.3 is running on Mac OS X 10.5 latest version, with Maildir
(LAYOUT=fs).  I have following issues when Entourage 2008 connects it, over
imap/imaps.

Entourage does not cache the mails.  After every restart the folder contents
are fetched fresh.  I have enabled the Entourage option to get entire
messages.  Entourage caches the gmail IMAP folders fine.  Also Outlook 2007
does not have this problem while connecting to the same IMAP server.

I have some big folders with a few thousands of emails.  Entourage fails
with Error: 4362 (Mail could not be retrieved this time) while fetching
mails from these folders.  Restarting and rebuilding the Entourage database
did not fix this issue.

Any tips to resolve these issues or to debug what is going on would be
greatly appreciated.  

Thanks,
Bijoy
-- 
View this message in context: 
http://www.nabble.com/Dovecot-on-Mac---Entourage-cannot-fetch-emails-tp21752176p21752176.html
Sent from the Dovecot mailing list archive at Nabble.com.



Re: [Dovecot] managesieve/README sieve_storage doc confusion

2009-01-30 Thread Stephan Bosch

Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

http://hg.rename-it.nl/dovecot-1.2-managesieve/file/tip/README contains 
the paragraphs (line 47):


Do'h! I forgot to rename those into sieve_dir. As per v1.2, the 
sieve_storage setting was renamed to sieve_dir and moved to the plugin 
section. This setting was already in use by the Sieve plugin and this 
change removes the possibility of specifying different directories for 
the ManageSieve service and the Sieve plugin.


I revised the README a little more than only the mention of 
sieve_storage. It was not very coherent anymore since the last major 
config changes. It should be much clearer now.



What's the correct meaning and placement of sieve_storage and sieve_dir ?
Sieve_storage is depricated (if accepted at all). You should only use 
sieve_dir and place it in the plugin section. This way, both Sieve and 
ManageSieve use the same directory at all times. For identical reasons, 
the 'sieve=' setting is now located solely in the plugin section as well.


Regards,

Stephan.


[Dovecot] dovecot-shared file

2009-01-30 Thread Thomas Hummel
Hello Timo,

About the dovecot-shared file, the wiki says :

  "Unless you're using a single UID for all the users, you'll need to have a
   dovecot-shared file in each shared maildir. The group and the file 
permissions
   for new files inside the maildir are taken from the dovecot-shared file." 

but says the following too :

  "With Maildir dovecot-shared file controls if the \Seen flags are shared or
   private. If you don't have the file, they're shared."

The question is "does it make sense (or is it even possible) not to have the
file ?". Why would one not have the file and how would it work then ? By
relying on the set-gid bit and umask ?

Finally, the wiki says :

  "If you do have the file, the \Seen flag state is stored only in the user's
  index files. By making each user have their own private index files, you can
  make the \Seen flag private for the users."

So, my undersanding is that :

  1) you have the file
1.a) if INDEX points to the same place, flags are shared but are lost if 
indexes are lost
1.b) if INDEX points to some user dependant place, flags are private but
 are lost if indexes are lost

  2) you don't have the file
 flags are shared, whatever INDEX points to and, since they're stored in 
filename, survive indexes lost.

 but does shared-mailboxes even work if we don't have that file ? maybe only
 if the set-gid bit and umask does what the file would have done ?

So maybe, if you want to share flags, 2) is safer dans if you want them
private, 1.b) is the only choice ?

thanks

-- 
Thomas Hummel   | Institut Pasteur
 | Pôle informatique - systèmes et réseau


[Dovecot] managesieve/README sieve_storage doc confusion

2009-01-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

http://hg.rename-it.nl/dovecot-1.2-managesieve/file/tip/README contains 
the paragraphs (line 47):


"
mail_location =
If, for some inobvious reason, the sieve_storage remains unset, the
managesieve daemon uses the specification of the mail_location to find out
where to store the sieve files. However, this is provided only for backwards
compatibility and you should always use the sieve_storage setting in stead.

Additionally, the ManageSieve service uses the following settings from the 
plugin
section of the config file. These settings are the ones used by the Sieve 
plugin.

sieve_dir =
This specifies the path to the directory where the uploaded scripts are
stored. Scripts are stored as separate files with extension .sieve, all 
other
files are ignored when scripts are listed by a ManageSieve client. If this
setting remains unspecified, the mail_location setting is used as explained
above.
"


Because sieve_storage is not mentioned anywhere else in the document
and because of this discussion:
http://dovecot.markmail.org/message/kzjpwdhyqhdn53zd , I suspect that
sieve_dir is the older naming of it. However, the source code uses
getenv("SIEVE_DIR") in lib-cmusieve, so this assumption is probably wrong.

What's the correct meaning and placement of sieve_storage and sieve_dir ?

Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSYMey3WSIuGy1ktrAQIfSwf/bF7ATn3MLDHL/rMZgqj5+cbHT5t60+UJ
Zq3ktiUePwbk1bP04Xtm0zrhY9g/E7pk3Q5WUAR2+laVUAYz1FIg5wp+ukS/lTpi
cbM3cXC4ZqcOPVqcb2Ntxjujx0FRjJzH/KVVp8JBTkHUQ3HWV8dXuyWxkpfAgnpw
O7t2uPW9fgzF7ACqQndjN/Qo/Xj6WUzICgI+SndNMscxipU20DY6CfMtOWDXJxl9
UPoLhHtB9GuylaKDNChY6bmYkO023veHuQMsOsziit0Ks25BO7J/bbiOieRaTesh
+O33abIQv8mzj186YZ34Z5zRtn1xa7gFNntkbk31zi2xYkCmo2atUw==
=DyFs
-END PGP SIGNATURE-


[Dovecot] dovecot-1.2-managesieve "make install" ignores Dovecot's prefix

2009-01-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I'm trying to compile dovecot-1.2-managesieve from hg repo with Dovecot 
v1.2 and I found that managesieve uses another "install" target/prefix 
than I've configured in Dovecot.


Is this intentional?

Because you must specify the compiled Dovecot sources, is managesieve just 
"loosly" connected to Dovecot so it would survive a Dovecot (minor) 
update, or do I need to compile managesieve each time as well?


If I need to compile each time, managesive should default to install into 
the same directory than Dovecot, shouldn't it?


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSYMXdHWSIuGy1ktrAQJLMAf/aAwnEoyNyieWBPjy/h2V6YFrJ4KVdtwZ
i+di1ft1w11P/abvZTf5dRI9dakw6aWX+ufs0gvLeWVYFwVRL4ZiIQsTUA8Z4X+3
1vuyemm70aGgX6pMX+O4oyAUoHIf1SzJFP+sGI+g40dZZbiScTugliOtdWnW7sO+
vI4rpRLUVs/xANByqKHUyj2LZrMJJbTFSfJyOHJQLc17WG9gM1RPyi+uzEIPWMg1
iqSv32ID9bWUWepIC65DG/+9TRoUP+CzMixzQBsz+pIpQk/zC11v94Lu7U6InbSg
j430JFIDv/hjd+6/lonvgABLlsQtG0VLv3tAa2Mi2uk8SIW7xIsOQQ==
=EUJ8
-END PGP SIGNATURE-


[Dovecot] Shared subscription, acl-list and uidvalidity(s)

2009-01-30 Thread Thomas Hummel
Hello,

I'm running dovecot-1.1.8/Maildir/ACL plugin. I sucessfully set up a Maildir
shared between users of the unix group 'doveshared' via a public namespace,
unix permissions and ACL files. 

The location of my public namespace is /path/to/public.
I tried 2 sub-setups :

First setup
--

drwxrws---  4 root  doveshared  4096 Jan 30 13:39 public
-rw-r-  1 root  doveshared18 Jan 30 13:38 public/subscriptions

I first connect (in Thunderbird) to dovecot with user 'hummel', then with user
'doveimap'. The following files are created in /path/to/public/ :

-rw---  1 doveimap  doveshared40 Jan 30 14:03 dovecot-acl-list
-rw---  1 hummeldoveshared 8 Jan 30 14:03 dovecot-uidvalidity
-rw---  1 hummeldoveshared 0 Jan 30 14:02 
dovecot-uidvalidity.4982fa7a

I've got my own idea about what they're used for, but can you explain what they
are supposed to be ? 

I guess the uidvalidity files are UIDVALIDITY, not for the mailboxes the
namespace holds (since my understanding is that the uidvalidities of mailboxes
are stored in the first line of dovecot-uidlist files), but for the namespace
itself (in case it is destroyed and then recreated for instance). Am I right ?
Why 2 files ?

Second setup
-

I follow the 'Shared subscriptions' section of the wiki :

drw-r-s---  4 root  doveshared  4096 Jan 30 14:19 public
-rw-r-  1 root  doveshared18 Jan 30 13:38 public/subscriptions

As expected, dovecot (and it shows in the logs), has not sufficient permissions
to create the files above (dovecot-acl-list, dovecot-uidvalidity,
dovecot-uidvalidity.4982fa7a). What are the consequences ?

Thanks.

--
Thomas Hummel   | Institut Pasteur
 | Pôle informatique - systèmes et réseau


[Dovecot] Using dovecot sasl for authenticating in openldap

2009-01-30 Thread Nathan Huesken
Hi,

I am using dovecot imaps and exim, both authenticating using dovecot-sasl. To 
keep passwords in one place I would like
to authenticate openldap users over dovecot-sasl.

So looking at this page:
http://www.openldap.org/doc/admin24/security.html
I figure it could be done using Pass-Through authentication.

For this, I need to create
/usr/lib/sasl2/slapd.conf

And adding a few config paremeters. This is a example

mech_list: plain
pwcheck_method: saslauthd
saslauthd_path: /var/run/sasl2/mux

I understand the mech_list parameter, but I have no Idea what to put in for the 
rest.
Any help?

Thanks!
Nathan


Re: [Dovecot] problem with some mailboxes (failed: Is a directory)

2009-01-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 30 Jan 2009, mi...@x.org.pl wrote:


Delete the Sent* directory.


Seems like there used to be any software or exadmin which created those
directories. I can not find out the source of it. I'm thinking about
deleting all those but I am wondering if Maildir specification does allow
any subdirectories in new/cur/tmp?


No, therefore there must another program / script / cronjob / way.

"Sent" sounds like "Thunderbird" sent mailfolder. Does your users have 
direct access to the filesystem? Can the users access the "full 
filesystem" with IMAP? So one of them could use "~/Maildir/cur" as mail 
root in the mail client or something like that.


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSYL3X3WSIuGy1ktrAQKPRAgAg1n7WCYbOTgNBMnWjO00qsqAuzA0+xg6
r5brGGV5Uv7qnuvaqY/0MS80KJ7PMbWRd8J1ynQMpRTVm1JxawkS6LzblpYt56ne
AvGNlvUbVVhmX/13+Jn+8TKAP9W1fsFpamo9KGHzc9W2Lg2A6h5HDopC+C9YmDnF
KHPk6d7d9ZNyzXGPYhslzW/5NArUkOt+8WgJ1VzBhZGVIk+/wlZa8S8lMQn1rABD
mInmoStNkAuZUDnw3jUz90GbUdfJcmqfuPmXwCj1UgTVtQzG79ppzJS4d8FjdYaz
wuxc+u8UvcK3nNPnfQv3qLW19PpyOYr8K7HCo+zCavYcXBKpHtJGYw==
=IpWH
-END PGP SIGNATURE-


Re: [Dovecot] Differences when expire plugin and cronjob?

2009-01-30 Thread Noel Butler
On Fri, 2009-01-30 at 18:22, Steffen Kaiser wrote:
You're not a singer are you, you resemble a well known one :)


> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Fri, 30 Jan 2009, Noel Butler wrote:
> 
> > We found it much easier to use a daily cron to clear out old crap
> >
> > find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10
> > -print | /usr/bin/perl -nle 'unlink;'
> 
> Which won't work necessarily because of "command line exceeded" errors :)
> 


Seems to work OK for us, but most of our users are pop3 and very few
'leave on server' so i guess we're lucky.


> Nevertheless, I'm quite happy with find myself.
> 


<>

Re: [Dovecot] Concurrent POP3 Sessions Issues

2009-01-30 Thread Mauricio López Riffo
Timo,

What messages should be see?  I execute the commands and shows a lot
of messages, i dont know what it means, i m not a programmer :)


Thanks



Mauricio López Riffo
Red Hat Certified Engineer 
804006455319519
Netline Telecomunicaciones Chile
Los Conquistadores 2430, Providencia, Santiago.
Codigo Postal: 7530041
Fono: +562 6560600 
Móvil: +569 90992366

> -Mensaje original-
> De: Timo Sirainen [mailto:t...@iki.fi]
> Enviado el: jueves, 29 de enero de 2009 20:46
> Para: mauricio.lo...@netline.net; Dovecot Mailing List
> Asunto: Re: [Dovecot] Concurrent POP3 Sessions Issues
> 
> On Jan 29, 2009, at 1:17 PM, Mauricio López Riffo wrote:
> 
> > I have problems with dovecot + ldap + nfs, we could't have more than
> > 20 concurrent sessions of pop3, when user 21 comes, the auth process
> > takes more than 1 sec and is incresing (while most users arrives, more
> > delay in
> > autenticacion exists) and my customers complaint about the service.
> > We need
> > support about 200 concurrents pop3 users, here is my details
> 
> Someone else was recently complaining about the same thing. Or was it you?
Anyway,
> dovecot-auth doesn't know how many users are logged in so if the problem
really is 21
> *concurrent users* instead of n logins/ second, I find it highly unlikely
that the problem is
> with authentication.
> 
> My guess is that this has something to do with NFS. Perhaps start Dovecot
with strace -tt -f
> dovecot and then when it's slowing down see what syscall it says is
blocking.




Re: [Dovecot] problem with some mailboxes (failed: Is a directory)

2009-01-30 Thread mikie
>> Jan 29 16:24:28 mailserv dovecot: IMAP(username):
>> unlink(/var/spool/mail/imap/user/username/Maildir/cur/Sent:2,ST)
>> failed:
>> Is a directory
> Something has created a directory called Sent inside Maldir/cur or
> Maildir/new. Dovecot treats it as a message and so it has added \Seen
> and \Deleted flags to it. Dovecot didn't create the Sent directory,
> look at other software/scripts you have.

Indeed.

>> There is one workaround I know which is:
>> rm /var/spool/mail/imap/user/username/Maildir/dovecot.index*
> Delete the Sent* directory.

Seems like there used to be any software or exadmin which created those
directories. I can not find out the source of it. I'm thinking about
deleting all those but I am wondering if Maildir specification does allow
any subdirectories in new/cur/tmp?

Thanks a lot!





Re: [Dovecot] Differences when expire plugin and cronjob?

2009-01-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 30 Jan 2009, Noel Butler wrote:


We found it much easier to use a daily cron to clear out old crap

find /var/vmail/*/*/*/*/Maildir/{.Junk,.Trash}/ -name "*.mx*" -mtime +10
-print | /usr/bin/perl -nle 'unlink;'


Which won't work necessarily because of "command line exceeded" errors :)

If you have a GNU find, you could use "-delete" with find, or -print0 in 
combination with "xargs -r0 rm". This _should_ have even better 
performance.


Nevertheless, I'm quite happy with find myself.

Bye.

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSYK4zHWSIuGy1ktrAQKlUgf+O4hyNKrojkA4bPcoEXFSUeMDABgJVd9p
b/W0RxrSx9mmiroDAsKz3PdhCgrH6Wgzcs1GsmJDKEXSp538pf5rII27X3ngiuJB
YqbsCA2YOdLNMfWpedu3r2TngL+qglmC/g8vB9rub4o/TgnFtyIYGsMGiVlx2JSy
V1gsQWI2Yd988sw+cVZEHmlekhancm0VHApBKKmCURLrS1dIlzRhROUF+wW1B0Ix
TgBPbIkxqTSDPJwxG6dBFA+7e9IDudZy5IZmt8WZow+gC5OlZRyIV2IGlgjoPKBH
2g9ACbehnuM3JM561dIQ9nfLZMXJS9ggEEU32SlbOXc/ZWLH2MNkjQ==
=UkPR
-END PGP SIGNATURE-


Re: [Dovecot] mbox to maildir batch conversion

2009-01-30 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 29 Jan 2009, Mike Hobbs wrote:

I'm upgrading my mail server from UW to Dovecot and I'd like to convert from 
mbox to maildir.  I've successfully convert myself and a few other users with 
the mb2md script.  All is well.


At http://wiki.dovecot.org/Migration/MailFormat Julian Fitzell provides 
another variant of this script.


I added another option "-o" to it, which inherits the ownership from the 
directory the item is created in.


http://www2.inf.fh-bonn-rhein-sieg.de/skdata/mb2md-2008-11-12.tgz

Because the script does not use Dovecot, you must know the destination 
path before hand.


===

On the same Wiki page there is the note:

"Convert plugin
Dovecot has a plugin which allows you to convert between any two mailbox 
formats supported by Dovecot. The conversion is done when the user logs in 
for the first time, or using convert-tool binary. See Plugins/Convert."


Honestly, the phrase "using convert-tool binary" catches my eye the first 
time. Maybe you check it out??


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSYK2H3WSIuGy1ktrAQKSmwgAlpHsD1pNEU0t0/f9wnDWaEdK8Pdhtost
eBuzWyxBA8S8kDC6SvNELby1GtRWky+sAPcosk9X9fmy3/FYXJl7EOSXMfgOFbqK
SR8WyDzGUkCyZyYzDBOtq36ZdAQtcghduP9bks03pCiwJBjQZ2+uQeFJjchnvkPy
9fsiM77OKK5ZEOCyUEEiNshtftoHRLFWkf7OBm2obCfw0s+48lA/fr69j3V/BK6+
fYd65tfN/6Fo9nTQuTnomJ2yrx5pGQmZBOcX2f+X22TuU3TuJ9P8klyvu/IDI8D0
JHoiOcAcaOqzWGJyMQON0m0K0USba0RPbntmCzX11YYuk05nJvGOMQ==
=wSi0
-END PGP SIGNATURE-