Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2001 16:19:30 +0300
From:      Odhiambo Washington <wash@wananchi.com>
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>
In-Reply-To: <NEBBKIPDBLGMBFJFJDOMEEECCDAA.jhvhs@promavto.ru>; from "Konstantin V. SEMENOV" on Thu, May 17, 2001 at 02:42:11PM %2B0400
References:  <45ba5b45ac14.45ac1445ba5b@mbox.com.au> <NEBBKIPDBLGMBFJFJDOMEEECCDAA.jhvhs@promavto.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--SEFvVLxbW/dEDtN8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Konstantin V. SEMENOV <jhvhs@promavto.ru> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010517161930.C35403>