From owner-freebsd-isp@FreeBSD.ORG Sat Dec 20 02:08:05 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA97016A4CE for ; Sat, 20 Dec 2003 02:08:05 -0800 (PST) Received: from ns2.wananchi.com (ns2.wananchi.com [62.8.64.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA19A43D36 for ; Sat, 20 Dec 2003 02:07:50 -0800 (PST) (envelope-from wash@wananchi.com) Received: from wash by ns2.wananchi.com with local (Exim 4.30 #1 (FreeBSD 4.9)) id 1AXe1R-000PgV-EW by authid for ; Sat, 20 Dec 2003 13:07:45 +0300 Date: Sat, 20 Dec 2003 13:07:45 +0300 From: Odhiambo Washington To: freebsd-isp@freebsd.org Message-ID: <20031220100745.GC89870@ns2.wananchi.com> Mail-Followup-To: Odhiambo Washington , freebsd-isp@freebsd.org References: <20031219165302.GA51410@ns2.wananchi.com> <20031219190055.GD85955@alexis.mi.celestial.com> <3FE3523D.7000701@centtech.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="//IivP0gvsAy3Can" Content-Disposition: inline In-Reply-To: <3FE3523D.7000701@centtech.com> X-Disclaimer: Any views expressed in this message,where not explicitly attributed otherwise, are mine alone!. X-Mailer: Mutt 1.5.5.1i (2003-11-05) X-Designation: Systems Administrator, Wananchi Online Ltd. X-Location: Nairobi, KE, East Africa. User-Agent: Mutt/1.5.5.1i X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: Managing Maildirs X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2003 10:08:05 -0000 --//IivP0gvsAy3Can Content-Type: multipart/mixed; boundary="Q0rSlbzrZN6k9QnT" Content-Disposition: inline --Q0rSlbzrZN6k9QnT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Eric Anderson [20031219 22:33]: wrote: > Bill Campbell wrote: >=20 > >Number one above will do the trick and is far more efficient than using = the > >``find ...-exec'', although you might want to modify it to only nuke mail > >over a certain age. To nuke all trash over 30 days old: > > > > find /home/*/Maildir/.Trash -type f -mtime +30 | xargs rm > > >=20 > On a totally unrelated note, I'm thinking about switching from mbox=20 > formatted mailboxes using imap, to a more robust and faster imap server= =20 > that uses maildirs.=20 That is a very easy move. Just don't get scared. I did it and it wasn't difficult. Planning is required. All I had to do was: 1. Make my mail server to run in queue_only mode. No deliveries. BTW I run Exim (http://www.exim.org). 2. I changed the config file for Exim to change a transport from doing delivery to mboxes to Maildir. 3. Ran a script to convert all the mboxes that I had into Maildir. The emails were in /var/mail/$user for all users (they were about 7k then). Since the MTA would now deliver mails into /home/$user/Maildir, I simply run a simple "redeliver" command: cd /var/mail for mbox in `ls -1`; do formail -Y -s sendmail \ $mbox@our.domain.tld.com < $mbox; done When that process completed ... 4. Restarted the MTA on "deliver" mode. All mail got redelivered. I didn't care whether they seemed new or not. The important thing is that they were there. I assumed they were new mail. Some users left mail on the server. That was their own problem. Sometimes an admin must have a tough skin, like the armadillo ;) 5. rm -rf /var/mail/* (that is where the mboxes lived) > My problem is, I have pop users, imap users, and elm/mutt/pine users > on the same box. That is not a problem. Their e-mail will be "there", only they may not be able to access it until they change their configs. Mutt users must change their .muttrc. I believe elm will work staright, but not sure. I used pine long ago so I can't comment on it. I use mutt all these days! > Does elm/mutt/pine work ok with maildirs?=20 Definately. > What about sendmail?=20 Sendwhat?? ;-) Please use a sane MTA. If you can't use Exim, use Postfix ;-) I can only talk about Exim for that is what I use. It has no problem at all delivering to Maildir. > What should I be looking out for? I believe a perfect script to migrate your mboxes to $home/Maildir. I have attached the script. If you have the mail located elswhere, you can use this script: #!/usr/local/bin/bash DIRNAME=3D"/var/mail" cd $DIRNAME for user in `ls`; do mv $user $user.mbox maildirmake ~$user/Maildir perfect_maildir.pl ~$user/Maildir < $user.mbox chown -R $user ~$user/Maildir chgrp -R mail ~$user/Maildir chmod 700 ~$user/Maildir find ~$user/Maildir/ -type f | xargs chmod 660 rm -f $user.mbox done NB: Please test this with some test account before you run it for all users. You will need courier-imap. Very easy to get up and running. If you want fancy life, go for Cyrus. I've never tried it because it's rather complicated, but maybe it's the swiss knife of imap servers? -Wash http://www.netmeister.org/news/learn2quote.html -- +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ |\ _,,,---,,_ | Odhiambo Washington Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ While most peoples' opinions change, the conviction of their correctness never does. --Q0rSlbzrZN6k9QnT-- --//IivP0gvsAy3Can Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/5B9xn7LIsuxjem8RAq3HAKCRJYL0jJVhPvgAxEuA+FaukWd16gCgg1pu 54yFm9ZU3LXnS8WaNRTSewc= =chD1 -----END PGP SIGNATURE----- --//IivP0gvsAy3Can--