DUPFILTER(8) | Double Precision, Inc. | DUPFILTER(8) |
dupfilter - Sample Courier mail filter
filterctl {[start] | [stop]} dupfilter
This is an example global mail filter written in C. This is a threaded filter that tries to block junk E-mail by attempting to detect multiple copies of the same message, which are rejected. This filter is presented mostly for educational purposes. It's method for detecting duplicate messages is rather simplistic, and, over time, ways of defeating it will certainly proliferate.
dupfilter works by calculating a hash value of the contents of every message it sees. Hash values of recent messages are kept in a circular FIFO queue. When dupfilter starts seeing messages with the same hash value, it will reject them. The hash value is calculated in such a way as to try to detect minor changes to messages' contents that are designed to avoid these kinds of filters, but it's still not a very sophisticated approach, and it can be easily fooled.
This is not a very smart mail filter. The hash function is very simple and is not expected to be very useful.
Don't even think of using dupfilter on a machine that either runs a mailing list, or contains mailboxes that subscribe to mailing lists. dupfilter likes to bounce mailing list traffic.
dupfilter uses the following configuration files. Changes to the following files do not take effect until the filter has been stopped and restarted.
/etc/courier/filters/dupfilter-hashsize
/etc/courier/filters/dupfilter-duplevel
/etc/courier/filters/dupfilter-mode
/etc/courier/filters/dupfilter-nthreads
courierfilter(8)[1].
Sam Varshavchik
10/28/2020 | Courier Mail Server |