# SpamAssassin rules file: URI tests # # Please don't modify this file as your changes will be overwritten with # the next update. Use @@LOCAL_RULES_DIR@@/local.cf instead. # See 'perldoc Mail::SpamAssassin::Conf' for details. # ########################################################################### require_version @@VERSION@@ uri NUMERIC_HTTP_ADDR /^https?\:\/\/\d{7,}/is describe NUMERIC_HTTP_ADDR Uses a numeric IP address in URL uri LONG_NUMERIC_HTTP_ADDR /^https?\:\/\/000\d+/is describe LONG_NUMERIC_HTTP_ADDR Uses a long numeric IP address in URL uri NORMAL_HTTP_TO_IP /^https?\:\/\/(?:\S*\@)?\d+\.\d+\.\d+\.\d+/i describe NORMAL_HTTP_TO_IP Uses a dotted-decimal IP address in URL uri HTTP_USERNAME_USED /^https?\:\/\/[^\s\/]+\@/is describe HTTP_USERNAME_USED Uses a username in a URL uri HTTP_WITH_EMAIL_IN_URL /^https?\:\/\/\S+=[-_\+a-z0-9\.]+\@[-_\+a-z0-9\.]+\.[-_\+a-z0-9]{2,3}(?:\&|\s)/ describe HTTP_WITH_EMAIL_IN_URL 'remove' URL contains an email address # Theo sez: # Have gotten FPs off this, and whitespace can't be in the host, so... # % Visit my homepage: http://i.like.foo.com % uri HTTP_ESCAPED_HOST /^https?\:\/\/[^\/\s]*%[0-9a-fA-F][0-9a-fA-F]/ describe HTTP_ESCAPED_HOST Uses %-escapes inside a URL's hostname # note: do not match \r or \n uri HTTP_CTRL_CHARS_HOST /^https?\:\/\/[^\/\s]*[\x00-\x08\x0b\x0c\x0e-\x1f]/ describe HTTP_CTRL_CHARS_HOST Uses control sequences inside a URL's hostname # look for URI with escaped 0-9, A-Z, or a-z characters (other safe # characters are sometimes unnecessarily escaped in nonspam; requiring # "http" or "https" reduces false positives) uri HTTP_EXCESSIVE_ESCAPES /^https?:\/\/\S*%(?:3[0-9]|[46][1-9a-f]|[57][\da])/i describe HTTP_EXCESSIVE_ESCAPES Completely unnecessary %-escapes inside a URL # thx to vince.delvecchio@analog.com for the legwork on the negative # lookbehinds here; saved a lot of work for us (bug 1035). uri PORN_4 /^https?:\/\/[\w\.-]*(?:xxx|(?