Navigation: How to... >
Use white lists and black lists
In most of the advanced gateway and connector settings in Diafaan SMS Server white list and black lists can be used to allow or block messages from or to specific numbers or number ranges.
Note: The uniform white list/black list was introduced in Diafaan SMS Server 220.127.116.11. White lists in gateways and connectors that were created in older versions can still behave in the original way. White lists in gateways and connectors that are created in Diafaan SMS Server version 18.104.22.168 or higher and white lists that start with a header bracket ( [ ) all conform to the new format.
Each section of the white list consists of a header and a list of numbers or keywords, one number/keyword on each line. The header specifies how the numbers/keywords are interpreted, as a white list or black list, case sensitive or case insensitive etc.
The header appears on a line by itself, in square brackets ('[' and ']'). Each header contains one or more options, separated by comma's, that define how the number list below it is handled. The header can contain the following keywords:
allow Allow the numbers/keywords in the list (default)
deny Block the numbers/keywords in the list
break Stop processing the rest of the list when a match is found (default)
nobreak Continue processing the rest of the list when a match is found
ignorecase Ignore upper and lower case differences in the match (default)
enforcecase Only allow an exact match
If the header contains a valid file name and if it is on the first line of the list then the file is used as the white list/black list and the rest of the list is ignored. The file must have the white list/black list format as is described in this text.
Under each header is a list of numbers or keywords, one number or keyword on each line. The numbers may contain the wildcard characters '*' (zero or more characters), '?' (a single character) and '#' (a single digit) to define a number range instead of a single number.
If the line starts with 'regex:' the rest of the line is handled as a regular expression.
Allow only German and British numbers except number +49123456789:
Use the file 'C:\temp\whitelist.txt' as the white list and/or black list:
Allow only valid email addresses (using a regular expression) but block gmail.com email addresses:
Allow only valid Dutch mobile numbers:
Allow only numbers +49123456789 and +49987654321 (without a header, see the note at the top of this page)