Top > s25r-whiteconv | Lang: JA EN | Last update : 2017/05/03 |
S25R home page | http://www.gabacho-net.jp/en/anti-spam/ |
S25R whitelist download page | http://www.gabacho-net.jp/en/anti-spam/white-list.html |
milter-greylist | http://hcpnet.free.fr/milter-greylist/ |
When you make use of the S25R anti-spam system for the sendmail and the milter-greylist,
taking advantage of the published S25R whitelist, an email from the sender matching the S25R rules
can be received without any delay by greylisting function.
The format of the S25R whitelist published at the S25R home page is the format for the postfix.
This bash script converts it into the format for the milter-greylist.
The "s25r-whiteconv.sh" bash script is copyright 2013 by Takao Abe. All rights reserved.
This software is free software, you can use and redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or any later version.
Published S25R whitelist for the postfix | Converted S25R whitelist for the milter-greylist | |
---|---|---|
/\.example\.jp$/ | Having alphabets | racl whitelist domain /\.example\.jp$/ sm_macro "whitelist-linenumber" "_" /\.example\.jp \[/ racl whitelist sm_macro "whitelist-linenumber" or ( *1 ) racl whitelist domain /\.example\.jp$/ |
/^192\.0\.2\.1$/ | A single IP address | racl whitelist addr 192.0.2.1 |
/^172\.16\.9[6-9]\.[0-9]+$/ | The 3rd. octet and the 4th. octet are predefined in the script ( *2 ) | racl whitelist addr 172.16.96.0/22 |
/^192\.0\.2\.1(6[1-9]|7[0-4])$/ | The 4th. octet is predefined in the script ( *3 ) | racl whitelist addr 192.0.2.160/28 |
/^192\.0\.2\.22(8|9)$/ | The ( ) regex of the 4th. octet expresses the CIDR /31 subnet | racl whitelist addr 192.0.2.228/31 |
/^192\.0\.2\.23[4-5]$/ | The [ ] regex of the 4th. octet expresses the CIDR /31 subnet | racl whitelist addr 192.0.2.234/31 |
/^192\.0\.2\.1(3[2-4]|40)$/ | The ( ) and/or [ ] regex expresses plural IP addresses ( *4 ) | list "whitelist-linenumber" addr { 192.0.2.132 192.0.2.133 192.0.2.134 192.0.2.140 } racl whitelist list "whitelist-linenumber" |
Complex, etc | Can not expand the regex ( *5 ) | # white-list.txt : Line=number, Reason |
*1 The command-line option -p specifies converted verbs.
*2 The REGEX_OCTET3_4 array variable in the script.
*3 The REGEX_OCTET4 array variable in the script.
*4 The MAX_EXPAND_REGEX variable in the script limits the number of IP address to be expanded from the regex.
*5 In the published S25R on Jul. 10, 2013, 3 regex's can not be converted.
Comment lines in the source code are written in Japanese.
md5sum | 397772b516071ef1190ede08a60ae739 |
sha1sum | a71b964fb848567fcd5328e73aca9d59e43ed306 |
s25r-whiteconv.sh [-b] [-p] inputfile outputfile
2017/05/03 | Correct mistake of the subnetmask for the 4th octet '([1-9]|1[0-4])'. |
2017/01/09 | Command line option -b is added. |
2015/02/08 | Convert single FQDN host name to non-regular expression ( plane expression ) |
2013/07/13 | Published |