# GET-DOMAIN.RC # # Function to take a host name and extract the associated domain. # Old-fashioned .city.state.us style US domains. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.[a-z][a-z]\.us$ { LOCALDOMAIN=${MATCH} } # Second-level domains belonging to ESPs which are generally responsible # but have some bad clients. SpamBouncer extracts the third-level domain # for these because sometimes it blocks a specific customer. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.(adm02\.com|\ aza\.pl|\ chtah\.com|\ hk\.com|\ messages2\.com|\ m0\.net|\ rg3\.net|\ rgc3.net|\ rm02\.net|\ rm04\.net|\ rm05\.net|\ rsc0[1-9]\.(com|net))$ { LOCALDOMAIN=${MATCH} } # Second-level domains belonging to dynamic DNS providers, web site # redirectors, etc. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * ! LOCALHOST ?? ^(geocities\.com|\ www\.geocities\.com|\ tripod\.com|\ www\.tripod\.com)$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.(0catch\.com|\ aax\.de|\ ath\.cx|\ bigsitecity\.com|\ bravehost\.com|\ ddl\.at|\ dnsrd\.com|\ do5\.us|\ e3z\.de|\ free\.fr|\ geocities\.com|\ hopto\.org|\ i8\.com|\ ly2\.com|\ narod\.ru|\ ocry\.com|\ optus\.nu|\ pp\.ru|\ r8\.org|\ tripod\.com|\ uk\.com|\ xaker\.ru|\ z3z\.net)$ { LOCALDOMAIN=${MATCH} } # Third-level domains belonging to dynamic DNS providers, web site # redirectors, etc. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.(pop\.com\.br|\ p2p\.com\.hk)$ { LOCALDOMAIN=${MATCH} } # Domains that can be two-level, and can be three-level, where the # assumption is that, if the second-level domain is three characters # or longer, it should be used, and otherwise the third-level domain # should be used. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z][-_0-9a-z]+\.\ (at|ch|cl|de|hk|hr|jp|nl)$ { LOCALDOMAIN=${MATCH} } # Domains that can be two-level, and can be three-level, where the # assumption is that, if the second-level domain is four characters # or longer, it should be used, and otherwise the third-level domain # should be used. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z][-_0-9a-z][-_0-9a-z]+\.\ (be|br|cc|cn|dk|lb|md|ph|ru|st)$ { LOCALDOMAIN=${MATCH} } # The .ST domain # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][0-9a-z][0-9a-z]+\.st$ { LOCALDOMAIN=${MATCH} } # Two-level TLDs. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.(ac|aero|as|biz|by|ca|\ cc|cd|com|coop|cx|cz|de|edu|es|exp|fi|fm|fr|geek|gov|hm|info|int|is|it|\ llc|lnx|ltd|lv|med|mil|museum|name|net|nic|noc|nu|null|\ org|pl|porn|pro|pt|ru|se|su|tk|travel|tv|us|ws|xxx)$ { LOCALDOMAIN=${MATCH} } # Three-level CCTLDs. # :0 * ! LOCALHOST ?? ^host\.example\.com$ * LOCALDOMAIN ?? ^example\.com$ * LOCALHOST ?? ([0-9a-z][-_0-9a-z]+\.)*\/[0-9a-z][-_0-9a-z]+\.\ [0-9a-z][-_0-9a-z]+\.(ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|\ at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|\ bw|bz|ca|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cy|\ cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|\ ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|\ hk|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|\ ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|\ ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|\ na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|\ pa|pe|pf|pg|ph|pk|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|\ sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|sv|sy|sz|\ tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|\ ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|\ wf|ws|ye|yt|yu|za|zm|zw)$ { LOCALDOMAIN=${MATCH} }