MAILFILTERRC(5)
πΈ MAILFILTERRC β the manual page, bestie edition πΈ
okay so this is MAILFILTERRC(5), aka a File Format Description, and it's literally the glow-up guide for your Mailfilter config. come sit with me, we're doing this together π
β¨ NAME β¨
mailfilterrc β the Mailfilter configuration file π
β¨ SYNOPSIS β¨
$HOME/.mailfilterrc
β¨ DESCRIPTION β¨
okay bestie, if you want the quick start β like, the "just get me going" era β go read the INSTALL file that ships with the Mailfilter distribution, and copy its example configuration. that's it. that's the whole vibe. after that you can run the program with some basic features and you're already slaying π
ngl, generally speaking the rcfile is everything. it holds all of Mailfilter's settings plus all the info about the mail accounts that should be checked for spam. and yes, you can leave little notes for yourself in there β just start a line with # and it's a remark, no cap π«Ά
here's the thing though: order does not matter for the keywords... except for the account set-up. the account setup is the one place where the order is giving very much "do it exactly like this or perish" π
so to define an account you have to use this whole block of commands, fr fr:
SERVER = "your.pop.server.com"
USER = "your.username"
PASS = "your.password"
PROTOCOL = "pop3"
PORT = 110
currently Mailfilter supports the POP3 and APOP protocols, which usually communicate over port 110. iconic. standard. the usual.
but π¨ β port 995 is required if Mailfilter is instructed to communicate using the SSL layer. so if you're going SSL, you change the port. no exceptions, bestie.
like, it looks like this:
SERVER = "your.pop.ssl.server.com"
USER = "your.username"
PASS = "your.password"
PROTOCOL = "pop3/ssl"
PORT = 995
see how PROTOCOL becomes "pop3/ssl" and PORT becomes 995? yeah. that's the move. secure era unlocked πβ¨
β¨ KEYWORDS β¨
okay bestie, so like, the rcfile is not case-sensitive β capital letters? lowercase? it literally does not care π . and you can place white space characters before and in between a command and its parameters. no stress.
# This is a typical comment
DENY = "^Subject:.*Get rich fast"
if you wanna see some example applications of the engaged keywords, please refer to the mailfilterex(5) man page. it's giving helpful fr fr.
ALLOW = "expression"β this is your override button, your VIP pass π«Ά. a message that matches anyALLOWrules will not be filtered or deleted. it's how you definefriends.ALLOWtakes a Regular Expression as argument.DEL_DUPLICATES = "[yes|no]"β deletes duplicates of messages sent to one or several accounts at once, i.e. removes redundant e-mails. takes eitheryesorno. default isno. so if you don't touch it, dupes stay. noted.DENY = "expression"β spam filter central π«. messages that match spam filters (unless they match anALLOWrule at the same time) are being deleted from the mail server.DENYtakes a Regular Expression as argument.DENY <> "expression"β negative spam filter. messages that do not match the negative filters are being deleted from the server.DENY<>takes a Regular Expression as argument, e.g.DENY<>^To:.*my_username.DENY_CASE = "expression"β case-sensitive spam filters. overrides the default settings for case-sensivity (seeREG_CASEfor details). takes a Regular Expression as argument.DENY_CASE <> "expression"β negative case-sensitive spam filters. overrides the default settings for case-sensivity (seeREG_CASEfor details).DENY_CASE<>takes a Regular Expression as argument.DENY_NOCASE = "expression"β case-insensitive spam filters. overrides the default settings for case-sensivity (seeREG_CASEfor details). takes a Regular Expression as argument.DENY_NOCASE <> "expression"β negative case-insensitive spam filters. overrides the default settings for case-sensivity (seeREG_CASEfor details).DENY_NOCASE<>takes a Regular Expression as argument.HIGHSCORE = valueβ defines a discrete threshold upon which messages should be deleted. individual scores are accumulated by assigning values and filters with theSCOREorMAXSIZE_SCOREkeywords. default is100.INCLUDE = "path"β include additional configuration files into the main Mailfilter rcfile. that is, the program settings may be conveniently split into several different files. expects a path and file name as argument.LOGFILE = "path"β define a log file for Mailfilter. the log file is being used to store error messages and information on deleted messages. expects a path and file name as argument.MAXLENGTH = valueβ max string length that must not be exceeded by any field of a message header. the according Internet standard RFC 822 suggests a limit of 998 characters per field. this option even overrides anyfriendlyALLOWrules, i.e. deletes them if they exceed the limit. assigning0disables the feature.MAXSIZE_ALLOW = valueβ max message size that must not be exceeded by all messages that match anyALLOWrule. (one could say, this is the size limitfriendsshould not exceed.) the limit does not affect other messages. to define a more general message size limit, useMAXSIZE_DENYinstead. takes the number of bytes as argument. assigning0disables this feature.MAXSIZE_DENY = valueβ general message size limit that must not be exceeded. (unless the incoming message matches anALLOWrule. in that caseMAXSIZE_ALLOWwould apply.) takes the number of bytes as argument. assigning0disables this feature.MAXSIZE_SCORE value = valueβ attach a score to a size limit. if that limit is exceeded, then the score will be added to the accumulated score from applying other scored filters (see theSCOREkeyword below). the first value (before=) is the score, the second value (after=) is the size limit. assigning0to either the score or the size limit disables this feature.NORMAL = "[yes|no]"β tells Mailfilter tonormalisethe subject strings in messages. a normalised string consists only of alpha-numeric characters. when normalisation is turned on, Mailfilter tries to apply its filters first to the original subject line, before it tries to match the normalised one. takes eitheryesorno. default isno.REG_CASE = "[yes|no]"β define how Mailfilter should treat its Regular Expressions, case-sensitive or case-insensitive. takes eitheryesas argument to enable case-sensivity or otherwisenoto disable it. the default behaviour is to ignore the case.REG_TYPE = "[basic|extended]"β define which type of Regular Expression Mailfilter should use. can either be switched toextendedorbasic. default isbasic.SCORE value = "expression"β assign a score to a filter. expects a discrete number and a Regular Expression filter as input. if the filter matches a line of the message header, the score is being accumulated to previously matched filters. (seemailfilterex(5)for an example.)SCORE value <> "expression"β same fashion asSCORE, but assigns the score only if the filter can not be matched to any line of the message header.SCORE_CASE value = "expression"β similar toSCORE, but treats the Regular Expression as case sensitive filter, regardless of other program settings.SCORE_CASE value <> "expression"β same fashion asSCORE_CASE, but assigns the score only if the filter can not be matched to any line of the message header.SCORE_NOCASE value = "expression"β similar toSCORE, but treats the Regular Expression as case insensitive filter, regardless of other program settings.SCORE_NOCASE value <> "expression"β same fashion asSCORE_NOCASE, but assigns the score only if the filter can not be matched to any line of the message header.SERVER/USER/PASS/PROTOCOL/PORTβ these keywords can only be used as a whole and in the given order. such a block defines an e-mail account to be checked for spam by Mailfilter. a typical block looks like this:
SERVER = "your.pop.server.com"
USER = "your.username"
PASS = "your.password"
PROTOCOL = "protocol"
PORT = 110
it is especially important to not change the arrangement of this block. at the moment, PROTOCOL supports either pop3 (pop3/ssl), or apop (apop/ssl). the normal variant usually corresponds to port 110, while encrypted communication via SSL, typically, requires port 995.
SHOW_HEADERS = "path"β store the message headers of absolutely all filtered e-mails of an account. expects a path and a file name as argument indicating where to store the headers in.TEST = "[yes|no]"β prevents Mailfilter from deleting any messages on any e-mail accounts. useful to experiment with filters and Regular Expressions and to see how Mailfilter reacts to the user's changes. can be turned on by assigningyestoTEST. default isno.TIMEOUT = valueβ define a server response time out in seconds. that is, the mail server has to respond to an issued command within a given time span, otherwise Mailfilter will drop the connection and issue an error. takes an integer value as argument. default is set to30(seconds).VERBOSE = valueβ define the level of verbosity. takes an integer as argument.0β Silent, show nothing at all1β Only show errors2β Only show "Deleted..." messages and errors3β Default; Show "Deleted..." messages, errors and "Examining..." messages4β Like (3), except this also shows the current account's username5β Like (4), except this also shows which filter matched which string of an e-mail header6β Debugging mode; prints out almost everything
π« DEPRECATED KEYWORDS π«
there are a few keywords from older versions of Mailfilter that are not supported anymore. the following list contains all these keywords and recommends substitutes.
ICASEβ useREG_CASEinstead.MAXSIZEβ useMAXSIZE_ALLOWandMAXSIZE_DENYinstead.MODEβ useVERBOSEinstead.
even though Mailfilter still silently supports some of these words, you can not rely on that for future versions. it is highly recommended to update old configuration files. periodt.
π SEE ALSO π
π COPYRIGHT π
Copyright Β© 2000-2020 Andreas Bauer <baueran@gmail.com>
this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and that's the whole vibe, bestie. this page is from Mailfilter, dated January 2009, manual section MAILFILTERRC(5). now go slay those spam filters π β¨
π¦ where this page comes from
- debian bookworm: mailfilter 0.8.9-1 Β· GPL-2.0-or-later WITH OpenSSL exception
- debian trixie: mailfilter 0.8.9-1+b1 Β· GPL-2.0-or-later WITH OpenSSL exception
- ubuntu jammy: mailfilter 0.8.7-1build1 Β· GPL-2.0-or-later WITH OpenSSL exception
- ubuntu noble: mailfilter 0.8.9-1build2 Β· GPL-2.0-or-later WITH OpenSSL exception
- ubuntu questing: mailfilter 0.8.9-1build2
- ubuntu resolute: mailfilter 0.8.9-1build3 Β· GPL-2.0-or-later WITH OpenSSL exception
- ubuntu stonking: mailfilter 0.8.9-1build4 Β· GPL-2.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms