Mailtraq - the Complete Email Server
   

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search

KB11122101 Using Wildcards

Wildcards are used in many places throughout the system.  Essentially, wildcards are used to match a single text item (such as an e-mail address, IP address, header entry, and so on).

Basic Wildcard Format

Wherever wildcards are supported, there are two basic wildcard characters that can be used.  The asterisk (*) represents zero or more characters, while the question mark (?) represents any single character.

For example,

jsm?th*@host.com

would match

jsmith@host.com

orjsmythe@host.com

but not

jsmeether@host.com

or

jsmith@otherhost.com

Wildcard Lists

In places where you can enter multiple wildcards (usually one per line), the item is tested against each in turn.  Wildcards can be prefixed with a tilde (~) which negates the match.

For example

~*@host.com
jsmith@host.com

would fail to match anything ending with @host.com, unless it was jsmith@host.com

Wildmat Format

If a wildcard is prefixed with =^, wildmat format is used.

Wildmat compares the text against the pattern and returns non-zero if the pattern  matches the text.  The pattern is interpreted according to rules similar to shell filename wildcards, and not as a full regular expression.

\x treats x as a literal (usually when x is an * or ? or other special character)

* represents zero or more characters

? represents any single character

[x..y] represents any single character in the set x..y.  A minus sign may be used to indicate a range of characters.  That is, [0-5abc] is a shorthand for [012345abc].  More than one range may appear inside a character set; [0-9a-zA-Z._] matches almost all of the legal characters for a host name.  The close bracket, ], may be used if it is the first character in the set.  The minus sign, -, may be used if it is either the first or last character in the set.

[^x...y] matches any character not in the set x...y, which is interpreted as described above. For example, [^]-] matches any character other than a close bracket or minus sign.

Regular Expression Format

If a wildcard is prefixed with =~, it is considered a regular expression.  Regular expressions are quite complex, so for more information refer to an Internet Search Engine.


Keywords: kb general
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video

 

   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.