Registrar Barrier DNS List
From Computer Tyme Support Wiki
(Difference between revisions)
m |
m (→DNS Lookup to Separate the domain part of a hostname) |
||
| Line 1: | Line 1: | ||
= DNS Lookup to Separate the domain part of a hostname = | = DNS Lookup to Separate the domain part of a hostname = | ||
| - | This DNS lookup helps you find the main domain part of a hostname. Sometimes it is called two level TLDs and three level TLDs. | + | This DNS lookup helps you find the main domain part of a hostname. Sometimes it is called two level TLDs and three level TLDs. |
| + | |||
| + | # Separates the domain part of a hostname - ftp.perkel.com returns perkel.com | ||
| + | # DNS lookup returns 127.0.0.1 for single level domains | ||
| + | # DNS lookup returns 127.0.0.2 for two level domains | ||
| + | # DNS lookup returns 127.0.0.3 for three level domains | ||
| + | |||
| + | warn !condition = ${if eq{$sender_host_name}{}} | ||
| + | dnslists = rb.junkemailfilter.com/$sender_host_name | ||
| + | set acl_c_rb = $dnslist_value | ||
| + | |||
| + | warn condition = ${if eq{$acl_c_rb}{127.0.0.1}} | ||
| + | set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*)$\N}{\$1}} | ||
| + | add_header = X-Sender-Domain: $acl_c_sender_host_domain | ||
| + | |||
| + | warn condition = ${if eq{$acl_c_rb}{127.0.0.2}} | ||
| + | set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*\..*)$\N}{\$1}} | ||
| + | add_header = X-Sender-Domain: $acl_c_sender_host_domain | ||
| + | |||
| + | warn condition = ${if eq{$acl_c_rb}{127.0.0.3}} | ||
| + | set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*\..*\..*)$\N}{\$1}} | ||
| + | add_header = X-Sender-Domain: $acl_c_sender_host_domain | ||
Revision as of 16:03, 2 July 2007
DNS Lookup to Separate the domain part of a hostname
This DNS lookup helps you find the main domain part of a hostname. Sometimes it is called two level TLDs and three level TLDs.
# Separates the domain part of a hostname - ftp.perkel.com returns perkel.com
# DNS lookup returns 127.0.0.1 for single level domains
# DNS lookup returns 127.0.0.2 for two level domains
# DNS lookup returns 127.0.0.3 for three level domains
warn !condition = ${if eq{$sender_host_name}{}}
dnslists = rb.junkemailfilter.com/$sender_host_name
set acl_c_rb = $dnslist_value
warn condition = ${if eq{$acl_c_rb}{127.0.0.1}}
set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*)$\N}{\$1}}
add_header = X-Sender-Domain: $acl_c_sender_host_domain
warn condition = ${if eq{$acl_c_rb}{127.0.0.2}}
set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*\..*)$\N}{\$1}}
add_header = X-Sender-Domain: $acl_c_sender_host_domain
warn condition = ${if eq{$acl_c_rb}{127.0.0.3}}
set acl_c_sender_host_domain = ${sg{$sender_host_name}{\N^.*\.(.*\..*\..*\..*)$\N}{\$1}}
add_header = X-Sender-Domain: $acl_c_sender_host_domain