Enabling and configuring On-Demand Email-to-Case

Enable and configure On-Demand Email-to-Case in your Salesforce org.

Before you begin

Postfix is set up as SMTP Relay as described in section Setting up Postfix as SMTP Relay.

About this task

Note: In Salesforce's verification process of a support email address an email with a verification link is sent from Salesforce to the specified address. To make sure this link can be clicked, it is necessary to temporarily map an accessible email address. Below the process is described step by step.

Procedure

  1. From Setup, enter Email-to-Case in the Quick Find box, and select Email-to-Case.
  2. In the initial page Introducing Email-to-Case click Continue.
    Figure 1: Email-to-Case initial page
    Email-to-Case initial page
  3. In the Email-to-Case Settings overview page click Edit.
    Figure 2: Email-to-Case settings overview page
    Email-to-Case settings overview page
  4. In the next page Email-to-Case Settings configure the settings as shown in the example below:
    Figure 3: Email-to-Case settings page
    Email-to-Case settings page
  5. Click Save.
  6. In the section Routing Addresses at the end of the Email-to-Case Settings overview page click New (Email2Case).
    Figure 4: Email-to-Case settings page - New Routing Address
  7. In the page Email-to-Case Routing Information configure the settings as shown in the example below:
    Attention: If you limit the email addresses or domains via the Accept Email From field, please additionally enter the domain name specified in the email token profile. This is required for the eperi sEcure Platform to process On-Demand Email-to-Case properly. Or leave this field blank if you want On-Demand Email-to-Case to receive email from any email address or domain.
    Figure 5: Email-to-Case Routing Information page
    Email-to-Case Routing Information page
  8. Before you click Save, follow these steps:
    1. Connect to the server where the Postfix SMTP Relay is installed using your preferred ssh tool (e.g. putty) and log in.
    2. Change to the folder /etc/postfix/
    3. Create and edit a new file named recipient_canonical
    4. Temporarily map an email address whose mailbox you can access, for example john.doe@example.com to the Email Address configured in the Email-to-Case Routing Information page. For example:
      /^support@mydomain[.]tld$/ john.doe@example.com
      Important: The left entry between the characters /^ and $/ is a regular expression. Please take extra care - for example - to mark a literal dot as an explicit dot (using "[.]").
      Important: Make sure that the above address mapping comes first before all other address mappings.
    5. Save and exit the file.
    6. Convert the recipient_canonical file to the Postfix database format:
      postmap /etc/postfix/recipient_canonical
    7. Restart Postfix, for example:
      sudo systemctl restart postfix
  9. Now, click Save in the Email-to-Case Routing Information page.
    A pop-up will appear asking you to verify the email address you entered:

  10. Get the test email and follow the steps in the email to verify your email address.
  11. After the successful email address verification, copy the Email Services Address as displayed in the section Routing Addresses at the end of the Email-to-Case Settings overview page:
    Figure 6: Email Services Address
    Email Services Address
  12. Edit the file /etc/postfix/recipient_canonical.
  13. Remove or comment out the temporary address mapping from above.
  14. Map the copied Email Services Address to the Email Address as configured in the Email-to-Case Routing Information page. For example:
    /^support@mydomain[.]tld$/ support@n1b207qsr.1x-8cai.cs101.case.sandbox.salesforce.com
  15. Save and exit the file.
  16. Convert the recipient_canonical file to the Postfix database format:
    postmap /etc/postfix/recipient_canonical
  17. Restart Postfix, for example:
    sudo systemctl restart postfix
  18. Configure that all mails to the Salesforce Email Services Address are inbound and the rest is outbound as follows:
    1. Still in the folder /etc/postfix/, create a new file named user_map
    2. Edit the file and add the configuration, for example
      support@n1b207qsr.1x-8cai.cs101.case.sandbox.salesforce.com inbound
      * outbound
    3. Save and exit the file.
  19. Convert the user_map file to the Postfix database format:
    postmap /etc/postfix/user_map
  20. Restart Postfix, for example:
    sudo systemctl restart postfix

Results

You have successfully enabled and configured On-Demand Email-to-Case in your Salesforce org.

What to do next

If you need to configure an additional routing address, repeat steps 6 to 17 from above. Otherwise continue with Setting up a support queue.