From owner-freebsd-questions Thu May 17 6:21:39 2001 Delivered-To: freebsd-questions@freebsd.org Received: from everest.wananchi.com (pop.wananchi.com [62.8.64.4]) by hub.freebsd.org (Postfix) with ESMTP id 665DB37B424 for ; Thu, 17 May 2001 06:21:32 -0700 (PDT) (envelope-from wash@wananchi.com) Received: from wash by everest.wananchi.com with local (Exim 3.22 #2) id 150Ngg-000P1G-00; Thu, 17 May 2001 16:19:30 +0300 Date: Thu, 17 May 2001 16:19:30 +0300 From: Odhiambo Washington To: freebsd-questions@FreeBSD.ORG Cc: bsd-freak@mbox.com.au, jhvhs@promavto.ru Subject: Re: Need a way to duplicate every message on mail server Message-ID: <20010517161930.C35403@everest.wananchi.com> Mail-Followup-To: Odhiambo Washington , freebsd-questions@FreeBSD.ORG, bsd-freak@mbox.com.au, jhvhs@promavto.ru References: <45ba5b45ac14.45ac1445ba5b@mbox.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="SEFvVLxbW/dEDtN8" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from "Konstantin V. SEMENOV" on Thu, May 17, 2001 at 02:42:11PM +0400 X-Operating-System: FreeBSD everest.wananchi.com 4.3-STABLE FreeBSD 4.3-STABLE X-Location: Nairobi, KE, East Africa. X-Uptime: 3:56PM up 20 days, 5:59, 3 users, load averages: 0.35, 0.20, 0.15 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --SEFvVLxbW/dEDtN8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Konstantin V. SEMENOV [20010517 13:41]: writing on th= e subject 'RE: Need a way to duplicate every message on mail server' Konstantin>=20 Konstantin>=20 Konstantin> > -----Original Message----- Konstantin> > From: owner-freebsd-questions@FreeBSD.ORG=20 Konstantin> > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of BSD = Freak Konstantin> > Sent: Thursday, May 17, 2001 2:16 PM Konstantin> > To: freebsd-questions@FreeBSD.ORG Konstantin> > Subject: Need a way to duplicate every message on mail server Konstantin> >=20 Konstantin> >=20 Konstantin> > Hi everyone, Konstantin> >=20 Konstantin> > I run several FreeBSD mail servers (sendmail) and need a way = to Konstantin> > duplicate every user's incoming messages to a single mailbox = for Konstantin> > archival purposes. Can this also be done for outgoing (SMTP) = messages? Konstantin> > Look forward to enlightenment from the list, Konstantin> >=20 Konstantin> > Best Regards...... and thanks in advance..... :-) Konstantin> >=20 Konstantin>=20 Konstantin> use /etc/mail/aliases Konstantin> ie - user1: user1, archive Konstantin>=20 Konstantin> don't forget to execute newaliases afterwards What happens if you have over 5K users and they were already existent on the system?? well you can have the file in db format, yes so that it's processed more quickly by your MTA but you'll need some script which can take the output of `ls -1` and append it to=20 the alias file with a ':' and the two names besides it. First create the user called 'archive'. I am an amateur at this but I believe the script below will automate the process. NB: I still DON'T know how to insert TAB character but I believe space will do!! cd /usr/home for i in `ls -1` ; do echo $i: "" $i, archive >> /etc/mail/aliases done /usr/bin/newaliases exit HTH -Wash -- Odhiambo Washington Wananchi Online Ltd., wash@wananchi.com 1st Flr Loita Hse Tel: 254 2 313985 Loita Street., Fax: 254 2 313922 PO Box 10286, 00100-NAIROBI,KE. Waste not, get your budget cut next year. --SEFvVLxbW/dEDtN8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7A8/in7LIsuxjem8RAqiTAJ0S5gzl91faoybhHO220KiOvlYcagCeJtsa AF1I+yFGn8N+Tj23vSILWWM= =PNdn -----END PGP SIGNATURE----- --SEFvVLxbW/dEDtN8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message