Skip to main content

Email Prefix

For AWS accounts created under the organization, each account requires a unique Email address. For this purpose, we can use a catchall email with a specific prefix aws-accounts-. We can define a shared mailbox with distribution list (group) to forward any email that comes with this prefix. Below are a few examples;

Anything that comes to these emails can be forwarded to [email protected] or desired shared mailbox address.

Create Shared Mailbox

  1. In Office365 or Google Mail
  2. Create a Distribution list (Microsoft 365) / Group (Google Workspace) [email protected].
  3. Add necessary members.
  4. Create shared mailbox [email protected].
  5. In forwarding setting in shared mailbox, forward incoming mails to [email protected].

Configure Catchall Prefix in Microsoft 365

  1. Visit office admin center
  2. Go to exchange admin center
  3. Navigate to Mail flowAccepted domains
    1. UI configuration
      1. Select the target domain
      2. Choose Internal relay and click Save
    2. PowerShell configuration (Optional)
      1. Open PowerShell
      2. Execute Set-ExecutionPolicy RemoteSigned
      3. Execute Install-Module -Name ExchangeOnlineManagement
      4. Execute Import-Module -Name ExchangeOnlineManagement
      5. Execute Connect-ExchangeOnline
      6. Execute Set-AcceptedDomain -Identity acme.xyz -DomainType InternalRelay
  4. Navigate to Mail flowRules
  5. Click on Add a rule and Create new rule
  6. Creating rule
    1. Create rule conditions
      1. Name → Catch all AWS accounts
      2. Apply this rule ifThe recipientaddress matches any of these text patterns | "aws-accounts-"
      3. Do the followingredirect message tothese recipients | "[email protected]"
      4. Click Next
    2. Create rule settings
      1. Check Rule mode to Enforce
      2. Click Next
    3. Click Finish
  7. In Rules dashboard click on newly created rule and Enable it.

Reference: Manage accepted domains in Exchange Online