Both sides previous revisionPrevious revisionNext revision | Previous revision |
config:filter_files [2022/03/14 19:33] – [See Also] tags Andre | 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 |
|''[[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 ===== |