[Mimedefang] using stream_by_domain() and a list of domains
Chris Murray
cmurray at apeman.org
Fri Mar 7 18:22:00 EST 2003
Hi All -
I've been running mimedefang for a couple of weeks on my home mail server
and its working great. But I have a couple of friends with there own
domain names that do not want to have filtering at all. I've been reading
up on stream_by_domain() and I looked at the example from the archives of:
In the stream-by-domain example
sub filter {
my($entity, $fname, $ext, $type) = @_;
if ($Domain eq "abc.com") {
# Filter actions for abc.com
} elsif ($Domain eq "xyz.com") {
# Filter actions for xyz.com
} else {
# Default filter actions
}
}
I wanted to avoid having to do an elsif for each domain and just look at a
text file in /etc/mail/defang-domains or something similar and see if the
the $Domain is in there, and if so proceed with the filter, if not, quit
and deliver the mail.
I was wondering if anybody has already done something similar, rather than
re-invent the wheel and all. I'm not sure of the best way to do this, as I
want to keep the cpu/ram usage low, since my machine is a P166 :)
any help would be appreciated.
Thanks - Chris
--
Chris Murray /"\
cmurray at apeman.org \ / ASCII RIBBON CAMPAIGN
http://apeman.org/ X AGAINST HTML MAIL
Cell: 604.861.8307 / \/
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
More information about the MIMEDefang
mailing list