Hello LuKreme,

Am 2010-06-06 12:57:48, hacktest Du folgendes herunter:
> I generally archive my messages into monthly mailboxes, and then
> messages that are more than a month old, I archive into a yearly
> mailbox. For example, this message will go  to the maildir
> .courier.2010-06.
> 
> Currently I am using my mail client to manually select messages in
> courier.2010-04 and move them to courier.2010, but this is somewhat
> slow and is prone to errors and problems and I often have to move a
> few thousand messages in a couple of steps, then actually delete the
> messages from the original mailbox.
> 
> I'd like to 1) automate this and 2) do it on the server side.
> 
> Before I go off and start moving files 'behind courier's back' I
> thought I'd check and see if there was already a solution out there,
> and what I should know before I go about using find and mv on the
> mailserver and mess up courier's maildirs.

I do this from a script which runs every night...

I am ongoing to rewrite to rwirte it, because in the meantime I have  to
move arround 5000 messages each night and it is a little bit to heavy IO

----[ STDIN ]-----------------------------------------------------------
Date: Mon, 07 Jun 2010 05:29:48 +0200
From: tdmaildirmv <[email protected]>
To: [email protected]
Subject: tdmaildirmv: 1830 messages archived

tdmaildirmv : Moveing files to archive folders.

Blacklist   : mv_arch_opts
Arch Opts   : mv_blacklist
Maildir     : ~/Maildir
Target      : ~/Maildir_archive

Date        : Mon, 07 Jun 2010 02:30:02 +0200

-------------------------------------------------------------------------------
Blacklist : .000_0
Blacklist : .BSD
Blacklist : .BSD.ADMIN
Blacklist : .Business
Blacklist : .Business.China
Blacklist : .Business.China.Alibaba
Blacklist : .Business.China.Elecsound_Electronics_Co_Ltd
Blacklist : .Business.China.Everising_Industrial_Co_Ltd
Blacklist : .Business.China.Formike_Electronic_Co_Ltd
Blacklist : .Business.China.GlobalSources
Blacklist : .Business.China.Goldpeak_Industry_Ltd
Blacklist : .Business.China.Heter_Battery_Technology
Blacklist : .Business.China.Honeywell
Blacklist : .Business.China.Huaxing_Lighting_Electrical_Factory
Blacklist : .Business.China.Hyperbattery
Blacklist : .Business.China.Longzhixing_Technology_Co_Ltd
Blacklist : .Business.China.Made_in_China
Blacklist : .Business.China.Made_in_China.Notifications
Blacklist : .Business.China.Made_in_China.Product_Alerts
Blacklist : .Business.China.Reashine_Optoelectronics_Co_Ltd
Blacklist : .Business.China.SouthRiver_Products_Ltd
Blacklist : .Business.France
Blacklist : .Business.France.AVNET-MEMEC
Blacklist : .Business.France.Rutronik
Blacklist : .Business.France.Silica
Blacklist : .Business.Germany.Antagus
<snip>
Moveing   : .ml_bsd.freebsd-questi...@freebsd_org                    49 [M/ 30]
Moveing   : .ML_debian                                                8 [Y/124]
Moveing   : .ML_debian.arm                                            5 [M/186]
Moveing   : .ML_debian.bash-completion-devel                          2 [M/ 32]
Moveing   : .ML_debian.changes                                        6 [M/ 32]
Moveing   : .ML_debian.devel                                         15 [M/ 32]
Moveing   : .ML_debian.devel-changes                                116 [M/ 32]
Moveing   : .ML_debian.edu                                           14 [M/186]
Moveing   : .ML_debian.events-nl                                      1 [M/ 32]
Moveing   : .ML_debian.hppa                                           4 [M/124]
Moveing   : .ML_debian.i18n                                           5 [M/124]
Moveing   : .ML_debian.l10n-german                                    4 [M/ 32]
Moveing   : .ML_debian.mentors                                       22 [M/ 62]
Moveing   : .ML_debian.mips                                           2 [M/372]
Moveing   : .ML_debian.mirrors                                        2 [Y/372]
Moveing   : .ML_debian.multimedia                                     1 [M/186]
Moveing   : .ML_debian.newmaint                                       2 [M/186]
Moveing   : .ML_debian.perl                                           6 [M/ 32]
Moveing   : .ML_debian.pkg-mc-commits                                 2 [Y/372]
Moveing   : .ML_debian.pkg-mc-devel                                   4 [Y/372]
Moveing   : .ML_debian.policy                                         4 [M/ 32]
Moveing   : .ML_debian.printing                                       4 [M/ 32]
Moveing   : .ML_debian.project                                       11 [M/ 32]
Moveing   : .ML_debian.python                                         3 [M/ 32]
Moveing   : .ML_debian.release                                        8 [M/ 32]
Moveing   : .ML_debian.security-announce                              1 [M/186]
Moveing   : .ML_debian.sparc                                          2 [M/186]
Moveing   : .ML_debian.testing                                        1 [Y/372]
Moveing   : .ML_debian.testing-changes                                2 [M/ 93]
Moveing   : .ML_debian.testing-security-announce                      1 [M/ 32]
Moveing   : .ML_debian.user                                          65 [M/ 32]
Moveing   : .ML_debian.user-french                                   11 [M/ 31]
Moveing   : .ML_debian.user-german                                   35 [M/ 47]
Moveing   : .ML_debian.user-spanish                                  37 [M/ 31]
Moveing   : .ML_debian.wnpp                                          57 [M/ 32]
Moveing   : .ML_debian.www                                            6 [M/ 32]
Moveing   : .ML_debian.x                                             23 [M/ 32]
<snip>
Moveing   : .ml_mail.clamav-us...@lists_clamav_net                   26 [M/ 32]
Moveing   : .ml_mail.courier-us...@lists_sourceforge_net             14 [M/200]
Moveing   : .ml_mail.exim-us...@exim_org                             13 [M/ 32]
Moveing   : .ml_mail.mutt-us...@mutt_org                              6 [M/ 32]
Moveing   : .ml_mail.procm...@lists_rwth-aachen_de                    3 [M/200]
Moveing   : .ml_mail.us...@spamassassin_apache_org                   47 [M/ 32]
<snip>
Blacklist : .SERVER
Blacklist : .SERVER.ACCOUNTS
Blacklist : .SERVER.mail
Blacklist : .SERVER.private_mail
Blacklist : .SERVER.private_michelle1
Blacklist : .SERVER.private_pgsql
Blacklist : .SERVER.private_router
Blacklist : .SERVER.private_samba3
Blacklist : .SERVER.private_tp570
Blacklist : .SERVER.vserver1
Blacklist : .Trash
-------------------------------------------------------------------------------

Date : Mon, 07 Jun 2010 05:29:48 +0200

Running : 179 minutes 46 seconds

Total maildir folders :     1686
Accessed maildir folders :   521
Moved messages :            1830
------------------------------------------------------------------------


As you can see the total and accessed folders  plus the moved messages
from my own account.

The current version of the script is using "formail" to  get  the  Date:
header and move the messages accourting  to  its  config...  As  I  have
writen already it is I/O intensive and now I like to use a database  for
the messages which where already accesses to get it  faster  runing  and
lesser disk I/O.

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France EURL       itsyst...@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstraße 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber [email protected]
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to