Kizza

Author



.

I’ve been wanting to do this for a while, but too busy, too bone idle and finally too agonize that I force lose my mail archive…. etc…etc…etc..

Over last weekend, I bit the bullet and did it.  To some extent because my DSL line was down, so there was no network activities, no mail, so force as well take advantage of the down time.  My next machinate is to drop AT&T DSL, I am tired of their bs.

Not meaning to get off the subject, but I am one of the original DSL sub in the neighborhood.  Got mine in ’96 (only 768k down/256K up).  I am about ~14-15000 ft from nearest CO, limit of DSL line.  Back then, Pacbell promised they will upgrade facility in the area so I can get quicker speed.  Quick forward to 2009, 14 years later, still same ancient… and still crappy service.

Ok, back to converting from mbox+procmail+dovecot to maildir+deliver+dovecot+sieve.  My mail archive goes back a long way, still have emails from 1987 (UUCP/Usenet mail).  I’ve always used mbox format, as that was the defaulting then, and since I never used qmail….

I do separate my mail into folders (just another mbox file) of course, otherwise my main mailbox would be in the gigabyte range.  I use procmail to filter incoming email into these separate boxes, to automate dealing with requests, to bounce spam, etc.  My .procmailrc is around 30K in size with lots of recipes, and also pulling in dozens of include files.

I knew that mbox is inefficient and that procmail is killing my system I/O, but sheer inertia kept me where I am.

After some investigate, I found mb2md.pl — a Perl speech — that will do most of the rumble work in converting an mbox file into maildir.   I am by Postfix for my MTA and dovecot for IMAP, so support for maildir is already there.  Supposedly, procmail supports maildir, but…

Here is the basic HOW-TO for converting mbox to maildir.

Basics: I am by Postfix, dovecot on FC11

1. Stop postfix and dovecot.

2. Install dovecot-sieve (and dovecot-managesieve if you have users beside yourself)

3. Edit /etc/postfix/main.cf and exchange mailbox_command to /usr/libexec/dovecot/deliver

mailbox_command = /usr/libexec/dovecot/deliver -a “$RECIPIENT”

The -a “$RECIPIENT” part is if you want to use user+foo@domain.com

4. Edit /etc/dovecot.conf

  • look for protocol lda { section and make sure this is there, add/uncomment/edit if not
  • # Support for dynamically loadable plugins. mail_plugins is a space separated

    # list of plugins to load.

    mail_plugins = sieve

    mail_plugin_dir = /usr/lib/dovecot/lda

  • look for plugin { section and look for these lines:
  • # Sieve plugin (http://wiki.dovecot.org/LDA/Sieve) and ManageSieve service

    #

    # Location of the active speech. When ManageSieve is used this is really

    # a symlink pointing to the active speech in the sieve storage space directory.

    sieve=~/.dovecot.sieve

    #

    # The path to the directory where the personal Sieve scripts are stored. For

    # ManageSieve this is where the uploaded scripts are stored.

    sieve_dir=~/sieve

  • Make sure /usr/libexec/dovecot/deliver exists and is executable.

5. If your mbox is in /var/spool/mail/yourname (or in /var/mail/yourname), i.e. mine is /var/spool/mail/tin, then you can run the following command to exchange that mbox into maildir.

mb2md -s /var/spool/mail/tin

mb2md will automaticaly make a directory named Maildir in your home directory (i.e. it made /home/tin/Maildir for me).  The converted maildir files will go in there (from /var/spool/mail/tin).

My filtered incoming mail (via procmail) is in the mail directory of my home directory, i.e. /home/tin/mail.  There are multiple directories and multiple mbox files in there.

There are also directories such as .imap directory, made by dovecot.  Anything there that is not a valid mbox file will be unseen by mb2md.

So now run

mb2md -s /home/tin/mail -R

That should recursively travel into your mail folder and exchange all mbox files there into maildir format in your Maildir directory.

I did found some mbox files that was unseen or failed to exchange.  But manually running mb2md on those file worked, e.g. mb2md -s /home/tin/mail/missed-mbox-file.

To make sure there won’t be an accident, I renamed my mail folder to mail.ancient.  Then start up postfix, dovecot.

I’ll add more information about the .dovecot.sieve file later.

REFERENCES

http://blog.tinle.org/2009/10/14/converting-from-mbox-to-maildir-procmail-to-deliverdovecotsieve/

Check it out:Command Center SkyHi

Kizza

Tagged with: convertingdeliver+dovecot+sievemaildirmboxprocmail 

.

HP 6730b Laptop 2.4GHz Core 2 Duo, 320GB, 2GB, DVD±RW LightScribe, Windows Outlook Biz, 15″

  • Intel Core 2 Duo P8600 2.4 GHz
  • 2 GB (installed) / 8 GB (max), DDR2 SDRAM, 800 MHz ( 1 x 2 GB)
  • 320 GB, Serial ATA-300, 5400 rpm
  • DVD±RW (+R DL) / DVD-RAM with LightScribe Technology
  • Featured with Webcam

Tailored for business continuity. This new design improves upon the successful HP Compaq 6710b Notebook PC with a slimmer look and more distinguished ID. Under the hood, enhanced features include the latest Intel Core 2 Duo processors, HP Mobile Broadband, and HP BIOS security improvements to keep your mobile workforce productive and secure.With a 15.4-inch diagonal widescreen show you choose between a high-resolution, an anti-glare or an HP BrightView show, all with a starting weight of only 5.9 lb and 1.32″ thin.

Rating: (out of reviews)

hp notebook review

Kizza

Tagged with: 2.4GHz320GB6730bcoreDVD±RWlaptopLightScribevistaWindows 

Answers Rating

  • Sci Fi Dave: Reformatting your computer with the Recovery CD should work just fine because what it does...  Thumb up 0
  • Jim B: Just format it and reload the OS and quit being so paranoid. None of your data is of any use to...  Thumb up 0
  • Steve: Yes there is a program: DBAN (see sources below) DBAN it, then do just as you said, use the...  Thumb up 0
  • jim: Meaning MS windows server software? In the long run the cost of the hardware will be essentially...  Thumb up 0
  • Biian: Here below is a guide on how to repair a laptop dc jack – a step by step takedown. May it...  Thumb up 0
© 2010 Computersplace.net