[Mimedefang] mimedefang and mail traffic logging

David F. Skoll dfs at roaringpenguin.com
Thu Apr 17 20:16:01 EDT 2003


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.

Another option is to read the MIME::Tools man page and go through the
entity passed to filter_end, copying parts of type text/* into an archive
file.  It's fairly straightforward Perl coding.

Regards,

David.



More information about the MIMEDefang mailing list