Mail Redirection - a guide

SurgeMail can redirect mail in one of four ways. These can be mixed but we suggest you pick one and use it as it can get very confusing:

  1. Global redirection and cc rules
  2. Per domain redirection and cc rules
  3. Per domain alias files (for backwards compatibility)
  4. Forward by returning new destination address from authent database

What is the difference?

What happens if I different redirection mechanisms together?

Redirects under the same category will all be applied at the same time and multiple rules may be applied. Also redirection may be to accounts which are in turn being redirected.

  1. Global redirection attempted. If g_redirect applied no further redirection is attempted (specifically this overrides #2 below)
    - g_redirect
    - g_redirect_cc


  2. Domain based redirection. If redirect or alias file is applied no further redirection is attempted (overrides #3)
    - redirect = domain redirect
    - alias file redirection
    - redirect_cc = per domain cc


  3. Authentication based fwd (overrides #4)

  4. Message delivered normally to local account.

Advanced use of redirection

Both local and global redirection allow * wildcard to be used in the "was" field and the %n wildcard to be used in the "to" field.

eg. *_*@domain -> %1@%2.domain

would allow joe_bloggs@domain to be redirected to joe@bloggs.domain

Gateways

The g_gateway setting is a final form of mail redirection that will will redirect mail for an entire domain (or subdomain) to a particular IP address.

Typically this other server is inside a fire wall so its local IP address is not known by the DNS server. You specify the domain and IP address (and optional login information) to send messages to and this server is treated as 'local' rather than remote in terms of open relay restrictions.