From owner-freebsd-questions Thu May 17 7:56:32 2001 Delivered-To: freebsd-questions@freebsd.org Received: from server1.axiomadvertising.com (server1.axiomadvertising.com [207.7.11.70]) by hub.freebsd.org (Postfix) with ESMTP id 7F74337B422 for ; Thu, 17 May 2001 07:56:28 -0700 (PDT) (envelope-from joe@axiomadvertising.com) Received: from axiomadvertising.com ([10.0.0.227]) by server1.axiomadvertising.com (8.11.3/8.11.3) with ESMTP id f4HEuR858619 for ; Thu, 17 May 2001 09:56:27 -0500 (CDT) (envelope-from joe@axiomadvertising.com) Message-ID: <3B03E69B.D2331192@axiomadvertising.com> Date: Thu, 17 May 2001 09:56:26 -0500 From: Joe Guetler X-Mailer: Mozilla 4.77 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Need a way to duplicate every message on mail server References: <45ba5b45ac14.45ac1445ba5b@mbox.com.au> <20010517161930.C35403@everest.wananchi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Odhiambo Washington wrote: > > * Konstantin V. SEMENOV [20010517 13:41]: writing on the subject 'RE: Need a way to duplicate every message on mail server' > Konstantin> > Konstantin> > Konstantin> > -----Original Message----- > Konstantin> > From: owner-freebsd-questions@FreeBSD.ORG > 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> > > Konstantin> > > Konstantin> > Hi everyone, > Konstantin> > > 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> > > Konstantin> > Best Regards...... and thanks in advance..... :-) > Konstantin> > > Konstantin> > Konstantin> use /etc/mail/aliases > Konstantin> ie - user1: user1, archive > Konstantin> > 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 > 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 > I'm no expert, but wouldn't a procmail recipe be able to duplicate incoming and outgoing mail to an archive? btw, I just starting learning procmail, so don't look to me to write the recipe if it can :) Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message