[Mimedefang] mimedefang and mail traffic logging

Russ GilmanHunt rgilmanhunt at hotp.com
Fri Apr 18 11:16:02 EDT 2003

On Thu, 2003-04-17 at 17:15, David F. Skoll wrote:
> On Thu, 17 Apr 2003, Ing. Daniel Manrique wrote:
> > I managed to come up with a crude mimedefang-filter configuration that
> > basically just lets everything through. However, I'm now at a loss as to
> > how to assemble a "reduced" version of the message, with attachments
> > removed but everything else intact (including headers - this is important
> > for me), and storing this in a file (one new file for each message is also
> > acceptable).
> I believe the simplest way to do this is with a two-tool approach:
> 1) Use MIMEDefang's add_recipient function to add an archival recipient:
> sub filter_end {
>     add_recipient('archive-robot at mydomain.net');
> }
> 2) Use a Procmail recipe for the archive-robot account to strip attachments
> and archive the messages.
Here's most of our procmailrc file, here:
DATEDIR=`date +%Y/%m/%d`

  * ? test -d $ARCHIVEDIR/$DATEDIR || mkdir -p --mode=750
  { }
:0 c
this saves _inbound_ mail only (or more properly, mail _to_ recipients
here in a directory structure like year/month/day/ where the filename 
is the username.  I don't have it stripping out attachments. That sounds
like an interesting idea.

Since I have outbound mail skipped by mimedefang, I don't think I'd see
much from adding a recipient (can you add a bcc recipient? does it
I would like to persue the attachments though. I wonder if there's an
easy way to handle "placing an attachment name into the mail file and
saving the attachment in a sep. directory" except I'd be worried about
overwriting the attachment.
Anyway, this works (mostly) for us.

More information about the MIMEDefang mailing list