procmail
[Top] [All Lists]

Re: Automatic Copy of Outgoing Mail

2001-08-03 08:05:34
On  3 Aug, Lawrence Mitchell wrote:
| * On [010803 14:38] Steve <steve(_at_)leeke(_dot_)com> wrote:
| > Can procmail be used to automatically copy all outgoing mail (i.e. mail I
| > send) to another address?
| > 
| > If not, can someone recommend how to do this?
| 
| You _can_ use procmail to do this, and a very similar problem was discussed
| on this list a few weeks ago (check the archives -- I can't remember the
| subject line).
| Basically, it involves setting up a cron job that will call procmail on a
| regular basis (say once a day).  You run procmail through formail with it's
| input as the "sent-items" mailfile for each user.

I don't recall the discussion, so don't want to dispute it. But from
your description the dependency on a sent items folder, and batch
processing once a day are two possible holes. To me, copying sent
messages for legal compliance would strongly suggest concurrent copies
and a process that ensures (as much as anything can) that all messages
are processed the same way.

I do vaguely recall some years back some discussion(s) of processing
outgoing mail through a ".backward" file (era eriksson's name ?). I
don't really have any more information to offer on it, but more could
be found in the archive, or maybe it'll jog someome else's memory.

The original description isn't clear to me. If Steve wants to copy only
messages that he individually originates, I may have something that
could be adapted to his needs. A few years back, when mail servers
began being configured to disallow mail from unresolvable domains, I
set up a recipe at my ISP to receive mail from my home machine (which
was accepted because it was their IP) and rewrite the headers before
forwarding it. Basically it allowed me to relay through the ISP without
needing to change my sendmail configuration at home to use the ISP as a
smart host. It would be trivial to adapt it to these needs (even if
the messages don't need relaying) and add a "c" recipe to create the
copy. It's a kludge, but worked fine for me.

If this needs implementing system wide with many users, then the
solution above wouldn't be workable. From what I recall on the
subject, with reference to sendmail, it's not trivial. (Although I
haven't looked at any sendmail releases in about 6 months.) I looked
into it at one point and found some references in web searches to a
sendmail .mc file that implemented system wide copies. IIRC it was
something done by Harker Systems, but I wasn't able to find it on their
site. I also seem to recall it being offered more conceptually than as
something necessarily ready for production systems. I did find a copy
somewhere and filed it away for future reference, but never looked at it
any further. Steve, if you want to see it and can't find it let me know and
I'll dig out a copy. Of course, if you're not working with sendmail it
won't be of any help.

-- 
                   /"\
Don Hammond        \ /     ASCII Ribbon Campaign
Raleigh, NC US      X        Against HTML Mail,
                   / \      and News Too

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail