Return Home
Overview
<attach>
<body>
<body>
<clientip>
<comment>
<configuration>
<copy>
<delay>
<dnslookup>
<domainquery>
<email>
<expression>
<expressions>
<file>
<filter>
<filters>
<header>
<header>
<helo>
<http>
<imap>
<index>
<inputpath>
<ipquery>
<log>
<mailfrom>
<maxbuffer>
<maxlines>
<message>
<modifysource>
<multiplerecipients>
<option>
<parser>
<path>
<quickresult>
<rcptto>
<result>
<results>
<return>
<rule>
<rules>
<scope>
<select>
<smtpextendedstatuscode>
<smtpstatuscode>
<target_filter>
<target_index>
<test>
<title>
Boolean type
Macros
Regular Expressions
Configuration File Reference
It will be helpful to open these example files in a new window as you review the file format description so that you can see the overall way the configuration file is built.
The XML index (version-specific):
Merak Mail version
Microsoft Exchange 2000 version
Communigate Pro version
The filters:
Filter
File 1 (regexflt_filters.xml)
Filter File 2 (regexflt_adult.xml)
Filter File 3
(regexflt_bulkmailers.xml)
Filter File 4
(regexflt_recipient.xml) - Only applicable to Microsoft Exchange 2000
version
Filter File 5
(regexflt_nigeria_scam.xml)
Filter File 6
(regexflt_whitelist.xml)
There is very little difference between the three index samples.
Primarily the Microsoft Exchange 2000 version includes a few additional features that are specific to the way SMTP activity could be hooked. It allowed me to address a personal pet peeve of Exchange 2000: not rejecting email addresses immediately while the SMTP client is sending them. In Exchange, any email address is accepted and the SMTP client goes on its merry way thinking it succeeded, and a non-delivery email gets generated for any invalid addresses. Since those emails could themselves be going to an invalid email address that was given by the SMTP client as the sender's address, a lot of traffic and captured "BadMail" files can accumulate. A hook to processing the RCPT TO: SMTP command allows the filter to be run against each address presented by the SMTP client, and the return code from the filter can cause a permanent error message to be sent to the client.
Some of the new features in this version will likely lead to reexamining the specific RegEx filters that are included here and how they're organized. For now, it's almost exactly the same RegEx expressions that were provided in the earlier version of the filter. Be aware that the examples probably do not show the best way to use this filter in its current form, but they do function. There are also several cases that were created specifically to test feature sets in this version and may not have much use except for confirming a feature functions. For example, you'll see tests made in the index XML file to decide which set of filter rules to apply, yet the tests all result in the same set of rules being applied. This could have been accomplished with only a wildcard. But the purpose was to test identifying various conditions that might lead to different filter rules being used. Because the sample files are actually the files I'm currently using on production servers, and this release is just an early look, I don't want to maintain a separate set of example files yet.
A short quick-start tutorial about Regular Expressions (RegEx) is available online. The tutorial provides a quick reference and examples of some of the common RegEx operators. More detailed technical information about RegEx (Regular Expression) operators is available in this Microsoft Word document. This is a reference guide not a beginners manual.
Each XML file contains the following line designating the XML file encoding followed by the topmost node "<configuration></configuration>". All options for the RegEx Filter DLL are contained within the configuration node.
The XML file format is described here in a hierarchical format. This is the topmost level of the file. The XML file must contain the line described below and the link will take you to a page showing what the "[configuration]" placeholder represents and what it then contains. As you dig deeper into the format, you'll find each possible node described.
<?xml version="1.0" encoding="utf-8" ?>
[configuration]