[Mimedefang] Simplified single purpose mimedefang-filter

David F. Skoll dfs at roaringpenguin.com
Fri Jun 23 14:27:04 EDT 2006


reader at newsguy.com wrote:

> How can I just ignore all the sub funcs in mimedefang-filter or make
> them return immediately and get on to the `fiter_end' function where
> I can hopefully insert some simple code to create and deposit a copy.

Use the following four-line filter file:

# ---- CUT HERE ----
sub filter_end {
    add_recipient('archive-bot@[127.0.0.1]');
}
1;
# ---- CUT HERE ----

And then make an alias "archive-bot" that just appends to a file.  For
example, you might put this in /etc/mail/aliases:

	 archive-bot: /var/spool/mail-archive.mbox

(Don't forget to run "newaliases")

There.  That wasn't so painful, was it?

> My perl is way too shakey to know how to do that withoug wreaking
> major havic.

This is becoming a common theme on the MIMEDefang list. :-(

MIMEDefang is written for people WHO KNOW PERL!  That's the
whole point of the program.

Regards,

David.



More information about the MIMEDefang mailing list