12.03.2015 Views

FortiGate Administration Guide - FirewallShop.com

FortiGate Administration Guide - FirewallShop.com

FortiGate Administration Guide - FirewallShop.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Antispam<br />

Using Perl regular expressions<br />

Some spammers use unsecured third party SMTP servers to send unsolicited<br />

bulk email. Using DNSBLs and ORDBLs is an effective way to tag or reject spam<br />

as it enters the network. These lists act as domain name servers that match the<br />

domain of in<strong>com</strong>ing email to a list of IP addresses known to send spam or allow<br />

spam to pass through.<br />

There are several free and subscription servers available that provide reliable<br />

access to continually updated DNSBLs and ORDBLs. Please check with the<br />

service being used to confirm the correct domain name for connecting to the<br />

server.<br />

Note: Because the <strong>FortiGate</strong> unit uses the server domain name to connect to the DNSBL<br />

or ORDBL server, it must be able to look up this name on the DNS server. For information<br />

on configuring DNS, see “Network Options” on page 99.<br />

Using Perl regular expressions<br />

Email address list, MIME headers list, and banned word list entries can include<br />

wildcards or Perl regular expressions.<br />

See http://perldoc.perl.org/perlretut.html for detailed information about using Perl<br />

regular expressions.<br />

Regular expression vs. wildcard match pattern<br />

Word boundary<br />

A wildcard character is a special character that represents one or more other<br />

characters. The most <strong>com</strong>monly used wildcard characters are the asterisk (*),<br />

which typically represents zero or more characters in a string of characters, and<br />

the question mark (?), which typically represents any one character.<br />

In Perl regular expressions, the ‘.’ character refers to any single character. It is<br />

similar to the ‘?’ character in wildcard match pattern. As a result:<br />

• fortinet.<strong>com</strong> not only matches fortinet.<strong>com</strong> but also fortineta<strong>com</strong>, fortinetb<strong>com</strong>,<br />

fortinetc<strong>com</strong>, and so on.<br />

To match a special character such as '.' and ‘*’ use the escape character ‘\’. For<br />

example:<br />

• To match fortinet.<strong>com</strong>, the regular expression should be: fortinet\.<strong>com</strong><br />

In Perl regular expressions, ‘*’ means match 0 or more times of the character<br />

before it, not 0 or more times of any character. For example:<br />

• forti*.<strong>com</strong> matches fortiiii.<strong>com</strong> but does not match fortinet.<strong>com</strong><br />

To match any character 0 or more times, use ‘.*’ where ‘.’ means any character<br />

and the ‘*’ means 0 or more times. For example, the wildcard match pattern<br />

forti*.<strong>com</strong> should therefore be fort.*\.<strong>com</strong>.<br />

In Perl regular expressions, the pattern does not have an implicit word boundary.<br />

For example, the regular expression “test” not only matches the word “test” but<br />

also any word that contains “test” such as “atest”, “mytest”, “testimony”, “atestb”.<br />

The notation “\b” specifies the word boundary. To match exactly the word “test”,<br />

the expression should be \btest\b.<br />

<strong>FortiGate</strong> Version 3.0 MR5 <strong>Administration</strong> <strong>Guide</strong><br />

01-30005-0203-20070830 455

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!