Rewrite Rule

From Roaring Penguin
Jump to: navigation, search

A rewrite rule is typically used in conjunction with Setup->Domain Mapping to provide the mapping method to be used to route email addresses through streams.

  1. Check that you are in the default stream of the realm with your domains. The upper-left corner always shows your context.
  2. Go to Setup : User Lookups. Add a new User Lookup. (the name doesn't really matter, I suggest "CompanyName-Rewrite")
  3. From the dropdown, select "Rewrite" as the type.
  4. At the next step, define the rule as:
    %u@companyname.com
    That means when this rule is used, the domain part of the stream will always be companyname.com no matter what.
  5. Click through and Finish.
  6. Go to Setup : Domain Mappings. Create a new line for each of the alias domains (if it isn't already there) and on the right, set it to use the rewrite rule ("CompanyName-Rewrite").

You can apply this rule to the primary domain as well to keep this screen looking consistent.

That will do it. The Domain Mapping is merely how the spam trap name is chosen; it doesn't affect delivery at all, the messages will be delivered to the original recipient address. This merely means that any emails to the alias domains will be processed through the same spam trap as the same username in the primary domain.