# SpamAssassin rules file: porn tests
#
# Please don't modify this file as your changes will be overwritten with
# the next update. Use /etc/mail/spamassassin/local.cf instead.
# See 'perldoc Mail::SpamAssassin::Conf' for details.
#
# Note: body tests are run with long lines, so be sure to limit the
# size of searches; use /.{0,30}/ instead of /.*/ to avoid huge
# search times.
#
# <@LICENSE>
# Copyright 2004 Apache Software Foundation
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# </@LICENSE>
#
###########################################################################

require_version 3.000002

###########################################################################

body FREE_PORN                  /\bfree (?:porn|xxx|adult)/i
describe FREE_PORN              Possible porn - Free Porn

body CUM_SHOT                   /\bcum[ -]?shots?\b/i
describe CUM_SHOT               Possible porn - Cum Shot

body PAY_SITE                   /\bpay[ -]?sites?\b/i
describe PAY_SITE               Possible porn - Pay Site

# "live cam" is a very common nonspam phrase, removed
body LIVE_PORN                  /\blive .{0,9}(?:fuck(?:ing)?|sex|naked|girls?|virgins?|teens?|porno?)\b/i
describe LIVE_PORN              Possible porn - Live Porn

body HARDCORE_PORN              /\bh[a\@]rd[ -]?core .{0,9}(?:teen|virgin|cheerleader|amat(?:eu|ue)r)|\bextreme h[a\@]rdcore/i
describe HARDCORE_PORN          Possible porn - Hardcore Porn

body HOT_NASTY			/\b(?=[dehklnswxy])(?:horny|nasty|hot|wild|young|horniest|nastiest|hottest|wildest|youngest|naughty|dirtiest|slutty|kinky|lusty|extreme|xxx+)\b.{0,9}\b(?=[acfghilmpsvx])(?:virgin|asian|cheerleader|sex|selection|fuck|fucking|anal\b|lesb(?:ian|o)|incest|chicks?|pics|movies|video|gay\b|porn|h[a\@]rdcore|schoolgirls|amateur|slut|adult|cum|xxx|sites?|hotties|shit)/i
describe HOT_NASTY		Possible porn - Hot, Nasty, Wild, Young

body BEST_PORN			/\b(?:best|biggest|largest|most|free|ultimate)\b.{0,9}\b(?:virgins?|anal\b|lesbians?|incest|porno?|h[a\@]rdcore|sluts?|xxx+)/i
describe BEST_PORN		Possible porn - Best, Largest, Most Porn

body NASTY_GIRLS                /\b(?:horniest|nasty|nastiest|hottest|wildest|slutty|xxx+)\b.{0,9}\b(?:girl|women|teen|babe)/i
describe NASTY_GIRLS            Possible porn - Nasty Girls

body AMATEUR_PORN               /\bamateur .{0,9}(?:sex|porn|star|sites?|college|babes|action|pics|trash|gang|rape)|\b(?:real|best) amateur/i
describe AMATEUR_PORN           Possible porn - Amateur Porn

body PORN_CELEBRITY		/\bceleb(?:rity|rities|s).{0,15}(?=[cenps])(?:sex|porn|pics|caught|nude|exposed|content)|\b(?=[fhns])(?:steamy|hot|nude|shocking|free|h[a\@]rdcore) celeb(?:rity|rities|s)/i
describe PORN_CELEBRITY		Possible porn - Celebrity Porn

body SOMETHING_FOR_ADULTS       /\badult.{0,9}(?:entertainment|sites?|industry|only|business|membership)/i
describe SOMETHING_FOR_ADULTS   Possible porn - Adult Web Sites

body PORN_15			/(?=[celstwvy])(?:college|eating|licking|spears|tight|wet|shaved|voyeur|young|teen(?:age)?).{0,16}pussy/i
describe PORN_15		Possible porn - various types of feline

body PORN_16			/\b(?:nasty|teen|dir(?:ty|iest)?|little).{0,16}\bsluts?/i 
describe PORN_16 		Possible porn - nasty, dirty, little etc.

body LOTS_OF_STUFF		/\b(?:\d{1,3}[,\.]?)+\d{3}.{0,20}\b(?:pics|pictures|images|photos|movies)/i
describe LOTS_OF_STUFF		Thousands or millions of pictures, movies, etc.

body DISGUISE_PORN              /\b(?:c[*0]cks?|d[1*]cks?|h[0*]rny|b[1*]tch(?:es)|f[*0]ckk?ed|p[*]ssy|p[*]ssies)\b/i
describe DISGUISE_PORN          Attempts to disguise porn words

# thx to vince.delvecchio@analog.com for the legwork on the negative
# lookbehinds here; saved a lot of work for us (bug 1035), also see bug 1835
uri PORN_URL_SEX                /^https?:\/\/[\w\.-]*(?<!es|ba)(?<!dle|sus)sex(?!press)[\w-]*\./i
describe PORN_URL_SEX           URL uses words/phrases which indicate porn (sex)
uri PORN_URL_SLUT               /^https?:\/\/[\w\.-]*slut[\w-]*\./i
describe PORN_URL_SLUT          URL uses words/phrases which indicate porn (slut)
uri PORN_URL_MISC               /^https?:\/\/[\w\.-]*(?:porn|hard-?core|taboo|lesbian|naughty)[\w-]*\./i
describe PORN_URL_MISC          URL uses words/phrases which indicate porn (misc)

header SUBJECT_SEXUAL		Subject =~ /[s5][e3\xE8-\xEB]x[u\xB5\xF9-\xFC][a4\xE0-\xE6@][l!|1](?:[l!|1]y)?.{0,2}[e3\xE8-\xEB]xp[l!|1][i1!|l\xEC-\xEF]c[i1!|l\xEC-\xEF]t/i
describe SUBJECT_SEXUAL		Subject indicates sexually-explicit content
