maps.conf - associates one email address with another




Address maps associate one email address with another, either to redirect notifications generated by PureMessage (such as Quarantine Digests), or for assigning one user's email preferences to other accounts for End User Web Interface usage. Address maps are processed from top to bottom. Within a map, if two mappings apply to a single address, the first mapping is used.

The default address maps (the Notifications Address Map and the Recipient Aliases Map) are implemented automatically; they are not explicitly implemented in the policy script.

The Notifications Address Map redirects PureMessage notifications (such as quarantine digests and virus notices) from the original message recipient to the recipient specified in the map. This map is accessible by editing the notifications file, located in the etc directory.

The Recipient Aliases Map replaces the original message recipient with another recipient for the purpose of applying user preferences (such as per-user whitelists and blacklists). This map is accessible by editing the recipient-aliases file, located in the etc directory. The recipient to whom the original message recipient's preferences have been assigned will also be able to view the original message recipient's email messages in the End User Web Interface (EUWI).

<map map_name>
The maps.conf configuration file describes the available predefined named maps to the PureMessage system. The file contains zero or more named map sections.
The map name.

Description of the map.

The source is prefixed by a URI-style scheme that selects what kind of source this is. The source can be one of the following:
The items are read from the indicated file.

If the source field does not begin with a scheme part, it is treated as if it was prefixed with 'file:'.

Look up matches from a SQL database.

Let a custom Perl module do the matching.

The following match types are supported:
Exact match.

Substring match.

Glob style matching that might be modified by a comparator. The wildcards are '*' (which matches any sequence of characters) and '?' (which matches a single character). A literal '*', '?' or '\' might be matched by escaping them with a backslash.

Same as match, but map entries starting with '!' are treated as a negative rule. During matching, each string to be matched is considered separately. If it matches at least one of the positive rules, but none of the negative rules, then it is a match.

The entries of the map are Perl5 regular expressions. If the map entry starts with '!', then it is negated as for nmatches.

Glob style domain and IPv4 address matching. Matching is always case insensitive.

If the list entry starts with a decimal number followed by '.' or '/', then it is considered an IP4 address with an optional mask. The format for an entry of this type is:

   <inet4>  = <ip> [ "/" <mask> ]
   <ip>     = <digits> "." <digits> "." <digits> "." <digits>
   <mask>   = <ip> | <bits>
   <digits> = integer in the range 0 .. 255
   <bits>   = integer in the range 0 .. 32

If the map entry does not start with a number, it is parsed as a glob style string that is matched against a domain name. The supported wildcards are:

   ?   match a single char, but not '.'
   *   match a sequence of chars, but not '.'.
   **  match a sequence of chars, including '.'

Matches are automatically anchored to the end of the string. A leading '@' can be used to force anchor to the beginning as well. If the map item starts with '!', then it is negated as for nmatches.

Some examples:

Matches against the exact IP address.

Matches IPs in the range.

This matches any hostname in the domain as well as '' itself. It does not match '' or ''.


Matches the same hostnames as above, but not '' itself.

Matches the same hostnames as above.


Matches hosts like '', but not multilevel names like ''.

Only matches the host '' and not any subdomains.

Glob style email address matching. The wildcards are the same as for domain, but '@' is prevented from matching on '*' and '?'. Also, if the map entry ends with '@' then the match is no longer anchored at the end.

Some examples:

Matches all addresses ending with a domain name of '' such as '', ''.

Matches all addresses with '' as the exact domain part.


Matches all addresses starting with the string 'dev-'.


Matches all addresses with 'foo' as the local part and a two level domain name with 'perl' as the first level, like '' and ''.


Matches all addresses with 'foo' as the local part and at least a two level domain name with 'perl' as the first level, like '' and ''.



Copyright (C) 2000-2008 Sophos Group. All rights reserved. Sophos and PureMessage are trademarks of Sophos Plc and Sophos Group.