1. Home
  2. Knowledge Base
  3. Settings
  4. Redirect / Forward rules
  1. Home
  2. Knowledge Base
  3. SMTP
  4. Redirect / Forward rules

Redirect / Forward rules

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?

  • Global redirection takes place as soon as the message arrives and is applied to local and non local addresses. Global redirection rules should use fully specified email addresses: g_redirect was="user1@fulldomain" to="user2@somedomain"
  • Per Domain redirection will be applied once a local destination domain is identified and allows individual accounts on a domain to be redirected. The match rule should not include the domain name:
  • Alias files for backward compatibility UNIX style alias files may be used to redirect mail for a certain accounts in a domain.
  • Fwd in Authent Database If your authentication lookup returns a "fwd=new@address" field then the mail will be redirected to this account. This is done just prior to message delivery and after full processing of the message. This is the setting which may be changed by users using the web based account administration.

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

Was this article helpful?

Related Articles