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 any ALLOW rules will not be filtered or deleted. it's how you define friends. ALLOW takes 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 either yes or no. default is no. so if you don't touch it, dupes stay. noted.
  • DENY = "expression" β€” spam filter central 🚫. messages that match spam filters (unless they match an ALLOW rule at the same time) are being deleted from the mail server. DENY takes 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 (see REG_CASE for details). takes a Regular Expression as argument.
  • DENY_CASE <> "expression" β€” negative case-sensitive spam filters. overrides the default settings for case-sensivity (see REG_CASE for details). DENY_CASE<> takes a Regular Expression as argument.
  • DENY_NOCASE = "expression" β€” case-insensitive spam filters. overrides the default settings for case-sensivity (see REG_CASE for details). takes a Regular Expression as argument.
  • DENY_NOCASE <> "expression" β€” negative case-insensitive spam filters. overrides the default settings for case-sensivity (see REG_CASE for 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 the SCORE or MAXSIZE_SCORE keywords. default is 100.
  • 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 any friendly ALLOW rules, i.e. deletes them if they exceed the limit. assigning 0 disables the feature.
  • MAXSIZE_ALLOW = value β€” max message size that must not be exceeded by all messages that match any ALLOW rule. (one could say, this is the size limit friends should not exceed.) the limit does not affect other messages. to define a more general message size limit, use MAXSIZE_DENY instead. takes the number of bytes as argument. assigning 0 disables this feature.
  • MAXSIZE_DENY = value β€” general message size limit that must not be exceeded. (unless the incoming message matches an ALLOW rule. in that case MAXSIZE_ALLOW would apply.) takes the number of bytes as argument. assigning 0 disables 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 the SCORE keyword below). the first value (before =) is the score, the second value (after =) is the size limit. assigning 0 to either the score or the size limit disables this feature.
  • NORMAL = "[yes|no]" β€” tells Mailfilter to normalise the 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 either yes or no. default is no.
  • REG_CASE = "[yes|no]" β€” define how Mailfilter should treat its Regular Expressions, case-sensitive or case-insensitive. takes either yes as argument to enable case-sensivity or otherwise no to 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 to extended or basic. default is basic.
  • 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. (see mailfilterex(5) for an example.)
  • SCORE value <> "expression" β€” same fashion as SCORE, but assigns the score only if the filter can not be matched to any line of the message header.
  • SCORE_CASE value = "expression" β€” similar to SCORE, but treats the Regular Expression as case sensitive filter, regardless of other program settings.
  • SCORE_CASE value <> "expression" β€” same fashion as SCORE_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 to SCORE, but treats the Regular Expression as case insensitive filter, regardless of other program settings.
  • SCORE_NOCASE value <> "expression" β€” same fashion as SCORE_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 assigning yes to TEST. default is no.
  • 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 to 30 (seconds).
  • VERBOSE = value β€” define the level of verbosity. takes an integer as argument.
    • 0 β€” Silent, show nothing at all
    • 1 β€” Only show errors
    • 2 β€” Only show "Deleted..." messages and errors
    • 3 β€” Default; Show "Deleted..." messages, errors and "Examining..." messages
    • 4 β€” Like (3), except this also shows the current account's username
    • 5 β€” Like (4), except this also shows which filter matched which string of an e-mail header
    • 6 β€” 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 β€” use REG_CASE instead.
  • MAXSIZE β€” use MAXSIZE_ALLOW and MAXSIZE_DENY instead.
  • MODE β€” use VERBOSE instead.

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 Β© 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