I think most MTA authors think mail archiving is the job of the MUA, but I
don't really agree. Why configure hundreds of clients when there is only
one MTA? But this is minority view - many consider archiving the moral
equivalent of snooping.

(long answer follows)

Do you want to record inbound or outbound messages? I assume you are using
sendmail. If you can configure Procmail as your delivery agent, it should
be easy to ask it to archive a copy of each inbound message.

For some time now we have a method for archiving incoming mail that suits
us well and doesn't use Procmail. It does not require deep knowledge of
sendmail.

We use the feature of mail.local that it can take multiple delivery
arguments. So while the usual configuration delivers mail with the
following arguments to Mlocal in the sendmail.cf:

    A=mail.local -f $g -d $u

(where $u is the addressee) we created a user "archive" and
modified the argument list to:

   A=mail.local -f $g -d $u archive

which also appends a copy of every incoming message to /var/mail/archive.
We use a cron job to compress and rotate this file out to a different
server for safekeeping. We feel that this is a lot more useful than
keeping midnight backups of /var/mail. 

Forwarded mail and mail handled by user-specified procmail in the
.forward file is not archived. This might be considered a bug or a
feature.

The archives can be read with any email client, though we expect to make
an extract with grepmail for the MUA to read when a user request for old
mail is made. grepmail is easy to use but slow. You might prefer to have
separate archives by user.

Outbound mail is much harder. This is certainly a FAQ on
comp.mail.sendmail but the usual answer, ("Use procmail") is
muddle-headed, since without very special attention Procmail doesn't
examine outgoing messages. There is some suggestion that Procmail can
process outgoing mail in section q4.20 of the sendmail FAQ, but no
instructions there or in the Procmail documentation. This suggestion in
the FAQ refers to a very obscure Usenet posting, which I have copied to
http://www.nber.org/copy-out.html in hopes someone will explain what it
means.

There is also a C program "logall.c" that should do this, but we haven't
tried it.

I have heard that Postfix has a bcc-always option that would handle this
problem with a minimum of fuss. Maybe sendmail isn't the only MTA.

Daniel Feenberg 
feenberg at nber.org




On Mon, 8 Apr 2002, Dima Shcherban wrote:

> 
> Dear admins,
> 
> I wonder if there is a simple but usable mail archiving tool/utility. I
> tried to do a search, but it looks like while the need is recognized,
> nothing simple exists. 
> 
> Simple - I don't want to run a relational database full of mail, most of
> which I will never need. 
> 
> Usable - When I do need to find that message, I would like to be able to
> do so. Time consumed is important, but secondary to functionality.
> 
> Desired features: Somethig like a mail client able to do simple searches
> (I mean regexp will be nice, but plain taxt will work too) in many
> mailboxes simultaneously (limited or not limited to a particular field or
> message body), be able to display results in more or less compact way (say
> show me a sybject line, if there is a match in message body), and be able
> to open a message, if I want to look inside.
> 
> Or is it already here, and I am crushing through an open door? 
> 
> --------------
> 
> Dimitri (Dima) Shcherban
> 
>               Phone: 800-445-2588+1+43507
>                  or: 508-249-3507
>       Hopkinton ext: x43507
>            Cellular: 508-633-8192
>               Pager: 877-563-1780
>               email: [EMAIL PROTECTED]
>         Pager email: [EMAIL PROTECTED]
> 
> 
> 
> ---
> Send mail for the `bblisa' mailing list to `[EMAIL PROTECTED]'.
> Mail administrative requests to `[EMAIL PROTECTED]'.
> 
> 
> 




---
Send mail for the `bblisa' mailing list to `[EMAIL PROTECTED]'.
Mail administrative requests to `[EMAIL PROTECTED]'.

Reply via email to