Both sides previous revisionPrevious revisionNext revision | Previous revision |
config:filter_files [2021/08/08 23:35] – Document the new support of text on either/both sides of the asterisk in patterns digital man | config:filter_files [2023/12/18 19:51] (current) – [Filter Files] Note about file must end in LF digital man |
---|
Filter configuration (''[[dir:ctrl]]/*.cfg'') and trash can (''[[dir:text]]/*.can'') files allow the sysop to specify words (or any sequence of characters) that will be used to disallow clients, users, or their content. | Filter configuration (''[[dir:ctrl]]/*.cfg'') and trash can (''[[dir:text]]/*.can'') files allow the sysop to specify words (or any sequence of characters) that will be used to disallow clients, users, or their content. |
| |
Each line in a filter file may contain a comparison pattern. Blank lines and lines beginning with a semicolon character ('';'') are ignored. | Each line in a filter file may contain a comparison pattern. Blank lines and lines beginning with a semicolon character ('';'') are ignored. Lines may contain up to 1000 characters. |
| |
| A tab (ASCII 9) character or a new-line (CR or CRLF) sequence will terminate (signify the end of) each comparison pattern. All characters between the first tab character and the new-line sequence may be considered metadata for the comparison pattern. |
| |
| To support the correct auto-addition of filters, it's important that **all comparison patterns end in a new-line sequence** (i.e. a non-empty file must end with an LF character). |
===== Comparison Patterns ===== | ===== Comparison Patterns ===== |
* Leading white-space characters are ignored | * Leading white-space characters are ignored |
|''[[email.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/email.can|email.can]]|''[[bademail.msg]]''|Disallowed (source or destination) e-mail addresses (see also ''[[twitlist.cfg]]'')| | |''[[email.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/email.can|email.can]]|''[[bademail.msg]]''|Disallowed (source or destination) e-mail addresses (see also ''[[twitlist.cfg]]'')| |
|''[[file.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/file.can|file.can]]|''[[badfile.msg]]''|Disallowed filenames for upload| | |''[[file.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/file.can|file.can]]|''[[badfile.msg]]''|Disallowed filenames for upload| |
|''[[host.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/host.can|host.can]]|''[[badhost.msg]]''|Disallowed hostnames for inbound connections (when hostname lookups are enabled)| | |''[[host.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/host.can|host.can]]|''[[badhost.msg]]''|Disallowed hostnames for inbound connections (when hostname lookups are enabled) and content| |
|''[[ip.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/ip.can|ip.can]]|''[[badip.msg]]''|Disallowed IP addresses for inbound connections| | |''[[ip.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/ip.can|ip.can]]|''[[badip.msg]]''|Disallowed IP addresses for inbound connections and content (e.g. messages)| |
|''[[ip-silent.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/ip-silent.can|ip-silent.can]]| |Silently-ignored IP addresses for inbound connections| | |''[[ip-silent.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/ip-silent.can|ip-silent.can]]| |Silently-ignored IP addresses for inbound connections| |
|''[[name.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/name.can|name.can]]|''[[badname.msg]]''|Disallowed user login name/alias (see also [[howto:block-hackers]])| | |''[[name.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/name.can|name.can]]|''[[badname.msg]]''|Disallowed user login name/alias (see also [[howto:block-hackers]])| |
|''[[phone.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/phone.can|phone.can]]|''[[badphone.msg]]''|Disallowed phone numbers for new users| | |''[[phone.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/phone.can|phone.can]]|''[[badphone.msg]]''|Disallowed phone numbers for new users| |
|''[[subject.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/subject.can|subject.can]]|''[[badsubject.msg]]''|Disallowed subjects in posted messages| | |''[[subject.can]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/text/subject.can|subject.can]]|''[[badsubject.msg]]''|Disallowed subjects in posted messages| |
| |
| **New in Synchronet v3.20:**\\ |
| Comparison patterns in ''.can'' files may contain metadata as tab-delimited ''key=value'' pairs. The keys supported are: |
| ^ Key ^ Description ^ |
| |''t'' | Date/time stamp of filter addition (in ISO-8601 format) | |
| |''e'' | Expiration date/time (in ISO-8601 format) | |
| |''p'' | Protocol used (informational only) | |
| |''r'' | Reason for filtering (informational only) | |
| |''u'' | User name/identification at time of filtering (informational only) | |
| |''h'' | Host name of client (informational only) | |
| |
===== Other Filter Files ===== | ===== Other Filter Files ===== |
^Filename / Page ^Default Contents^Description^ | ^Filename / Page ^Default Contents^Description^ |
|''[[spamblock.cfg]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/spamblock.cfg|spamblock.cfg]]|Hostnames and IP addresses blocked from sending e-mail to the [[server:mail|Mail Server]] (see also ''spamblock_exempt.cfg'')| | |''[[spamblock.cfg]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/spamblock.cfg|spamblock.cfg]]|Hostnames and IP addresses blocked from sending e-mail to the [[server:mail|Mail Server]] (see also ''spamblock_exempt.cfg'')| |
|''[[twitlist.cfg]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/twitlist.cfg|twitlist.cfg]]|Disallowed (source or destination) e-mail addresses (enclosed in <angle brackets>) or names (see also ''[[email.can]]'')| | |''[[twitlist.cfg]]'' |[[https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/ctrl/twitlist.cfg|twitlist.cfg]]|Disallowed (source or destination) e-mail/netmail addresses or names (see also ''[[email.can]]'')| |
| |
===== Filter Exemption Files ===== | ===== Filter Exemption Files ===== |
* [[:config:|Configuration]] | * [[:config:|Configuration]] |
| |
{{tag>filter abuse spam}} | |
| {{tag>configuration security abuse spam cfg can}} |
| |