Both sides previous revisionPrevious revisionNext revision | Previous revision |
config:filter_files [2021/11/16 17:50] – [Other Filter Files] e-mail/netmail addresses should not be in angle-brackets, not sure why it was stated here that way 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 |
|''[[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 ===== |
* [[:config:|Configuration]] | * [[:config:|Configuration]] |
| |
{{tag>filter abuse spam}} | |
| {{tag>configuration security abuse spam cfg can}} |
| |