DUPFILTER(8)

πŸ“¦
version 2.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– DUPFILTER(8) πŸ’–

ok so bestie, listen β€” this is the manual for dupfilter, and yeah it's section 8, and yeah the author is S. Varshavchik, but before you spiral: it's a sample filter. Like, a demo. An educational moment. Come sit with me. 🫢


✨ NAME ✨

dupfilter β€” the Sample Courier mail filter, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

filterctl {[start] | [stop]} dupfilter

that's the whole vibe. you start it, you stop it, that's it, periodt.


🌸 DESCRIPTION 🌸

ok so here's the tea β˜• β€” dupfilter is an example global mail filter written in C. It's a threaded filter (yes, threads, we love a multitasking icon πŸ‘‘), and what it does is try to block junk E-mail by attempting to detect multiple copies of the same message, which then get rejected. bye felicia πŸ‘‹

but β€” and I need you to hear me on this β€” this filter is presented mostly for educational purposes. Its method for detecting duplicate messages is rather simplistic, and over time, ways of defeating it will certainly proliferate. Like, it's not gonna stay clever forever, bestie. It's giving "first draft." 😭

So how does it actually work? ✨ 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 (iconic data structure behavior, honestly). When dupfilter starts seeing messages with the same hash value, it will reject them. 🚫

And 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 β€” which, slay, points for trying πŸ’… β€” but it's still not a very sophisticated approach, and it can be easily fooled. fr fr. lowkey humbling.


πŸ’€ BUGS πŸ’€

ok so this section is rough, brace yourself:

  • 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. Not "might." Likes to. It's a whole personality trait. πŸ™ˆ
bestie please take the mailing list warning seriously, this is the dramatic part

πŸ¦‹ FILES πŸ¦‹

dupfilter uses the following configuration files. And listen β€” changes to the following files do not take effect until the filter has been stopped and restarted. So no, editing them mid-run is not it. Stop it, then start it. πŸŽ€

  • /etc/courier/filters/dupfilter-hashsize This file contains a single numerical value that sets the size of dupfilter's circular FIFO queue. Bigger queue, longer memory. 🧠
  • /etc/courier/filters/dupfilter-duplevel This file contains a single numerical value that sets how many identical messages dupfilter will tolerate before blocking them. When this many identical messages are seen, dupfilter will start rejecting all messages with the same content. So it's a patience meter, basically. πŸ’…
  • /etc/courier/filters/dupfilter-mode If this file exists and contains the word "all", dupfilter will create its socket in /var/lib/courier/allfilters, otherwise the socket will be created in /var/lib/courier/filters β€” see courierfilter(8)[1] for more information. πŸ‘‘
  • /etc/courier/filters/dupfilter-nthreads This file contains a single numerical value that sets the number of threads created (each thread is used to calculate a message's hash value). The default number of threads is 4. ⭐

🌈 SEE ALSO 🌈

courierfilter(8)[1].


πŸ‘‘ AUTHOR πŸ‘‘

Sam Varshavchik     Author


πŸ“ NOTES πŸ“

  1. courierfilter(8) https://www.courier-mta.org/courierfilter.html

and that's the whole page bestie, you ate it, you read the entire thing, main character energy fr fr 🫢✨

this was brought to you by the Courier Mail Server, dated 01/10/2026, and it's still filed under DUPFILTER(8) πŸ’– bye!! πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • ubuntu stonking: courier-mta 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms