Skip to main content
Version: v3.4 print this page

Email Datasource

Email datasources enable users to seamlessly ingest data sent over emails as attachments, directly into Amorphic Datasets.

How to create an Email Datasource?​

An email datasource can be created using an email address as follows:

Email Datasource Creation

Here is a description of all the fields required for creating an Email Datasource:

AttributeDescription
Datasource NameGive the datasource a unique name.
Datasource TypeType of datasource, in this case, it is Email.
DescriptionUser can describe the datasource purpose and important information about the datasource.
Email AddressEmail Address of the recipient.
Enable ScanEnable/Disable this option to scan incoming emails for spam and viruses. This option is disabled by default.
Enable TLSEnable/Disable this option to reject any incoming emails that aren't sent over a secure connection. This option is disabled by default.
Note

Enable Scan, Enable TLS and Description are the only attributes that are editable after datasource creation.

How to verify an Email Datasource?​

Important Note

To successfully verify an email datasource, the domain used for the datasource must be one you control in DNS. You need access to that domain’s DNS settings to publish the records Amorphic shows on the datasource details page.

Verifying an email datasource is a two-step process:

1. Verify the email address

Confirm the recipient address by opening the verification email from Amazon SES and clicking the link: Verification Email

2. Verify the email domain with Easy DKIM

Prove domain ownership by publishing the Easy DKIM DNS records shown on the datasource details page. Amazon SES no longer completes domain verification for new identities using the legacy _amazonses TXT method; Amorphic now uses Easy DKIM (three CNAME records) instead.

Also publish the MX record so inbound mail for this address is routed to Amazon SES in your Amorphic region.

DNS Records

After both steps succeed, refresh the details page. The verification status should change to Verified: Datasource Verification

Note

Multiple email datasources cannot be created using the same email address.

Updating DNS Records​

DNS records (zone files) tell authoritative DNS servers how to handle requests for a domain. For email ingestion, publish the records from the datasource details page:

Record typePurpose
CNAME (Easy DKIM)Three records that prove domain ownership to Amazon SES. Name is typically {token}._domainkey.{domain}; value is typically {token}.dkim.amazonses.com (or a regional SES DKIM zone when SES returns one).
MXRoutes inbound SMTP mail for the domain/address to Amazon SES (0 inbound-smtp.{region}.amazonaws.com). Required for receiving mail into Amorphic.
TXT (legacy)Older datasources that were verified with _amazonses.{domain} may still show a TXT name/value. Domains already verified with that TXT method remain valid and do not need to be re-verified with Easy DKIM CNAME records. New datasources use Easy DKIM CNAMEs instead.

The process of updating DNS records varies by DNS provider; the overall flow is the same. Example using Amazon Route 53:

Updating DNS records

DNS changes usually propagate within a few minutes, but can take up to a few hours. Propagation time depends on TTL, the domain registry, and other network factors.

Important Note
  1. If you need to create another datasource on the same email domain, point MX back to the domain’s normal mail server (or temporarily prioritize that MX) so you can receive the SES verification email. Prefer adding MX records with priorities (0, 10, 20, …) instead of overwriting, then set priority 0 on the record that should receive mail.
  2. Use a dedicated domain or subdomain for email ingestion so you do not disrupt day-to-day mail on your primary corporate domain.
  3. Domain verification for new email datasources requires the Easy DKIM CNAME records. Publishing only the legacy TXT record is not enough for new SES identities.
  4. If a domain was already verified with the legacy TXT method before this change, you do not need to publish Easy DKIM CNAMEs for that identity. It continues to work for email ingestion.

Test Datasource​

This functionality allows users to quickly verify the correctness of the provided email address. By initiating this test, users can confirm whether the email address is correct and that DNS is set up for receiving (Easy DKIM CNAMEs for domain ownership plus MX for inbound routing). Test Email Datasource

Data migration to Amorphic​

To migrate data to Amorphic, users must create a new Dataset. They should select the Datasource Type as 'Email' and subsequently choose the Email datasource from the provided drop-down list. During dataset creation, users are restricted to choose FileType as 'others' and target location as 'S3'.

Moreover, additional parameters can be provided by clicking on the Add Email Rules if required. The allowed parameters are:

  • EnableBodyExtraction: Enables or disables the extraction of email body content. It accepts 'yes' to enable or 'no' to disable. This functionality exclusively extracts text content from the body of the email and does not include elements such as inline images, embedded videos, formatted text styles, etc.
  • BodyFileType: Specify the file type for the extracted email body. Users are provided with the option to select from JSON, TXT, or PDF formats. In cases where no file type is explicitly provided, the default setting will use JSON format.
  • AllowEmailsFrom: Filter to allow emails only from specified email addresses.
  • ExcludeEmailsFrom: Filter to exclude emails from specified email addresses.
  • AllowEmailDomains: Filter to allow emails only from specified domains.
  • ExcludeEmailDomains: Filter to exclude emails from specified domains.
  • AllowFileTypes: Filter to allow only specific file types for the dataset.
  • ExcludeFileTypes: Filter to exclude specific file types for the dataset.

Email Datasource Dataset Creation

Note

Additional Parameters can be modified or removed while editing the dataset.

After successful dataset creation, the user can send emails to the email address and the attachments would be ingested to the dataset.