Email Data Flow
Source code: app/email-incoming
Here we document the processing of incoming and outgoing emails in GCN using Amazon Simple Email Service (SES). The source code for incoming email processing is in the app/email-incoming directory.
Note that each flow chart represents the email processing for a single one of GCN's three deployment stages. In each diagram, replace stage.gcn.nasa.gov with gcn.nasa.gov for production, test.gcn.nasa.gov for testing, or dev.gcn.nasa.gov for development.
Circulars Ingestion
Source code: app/email-incoming/circulars
Authorized GCN users can submit GCN Circulars in either of two ways: by logging in and completing the Web form or by submitting an email to circulars@stage.gcn.nasa.gov.
By Web form
In order to submit a Circular via the Web form, the user must be signed in and must belong to the circular-submitter
Cognito group. The subject of the Circular is validated against a list of allowed and disallowed keywords. If these checks pass, then the Circular is accepted, stored in the database, and distributed to GCN Circulars subscribers.
By email to circulars@stage.gcn.nasa.gov
To submit a Circular via email, the user sends an email to circulars@stage.gcn.nasa.gov. When Amazon SES receives this message, it triggers a Lambda function whose source code is in app/email-incoming/circulars. The Lambda function does the following:
- A copy of the incoming email is saved in an S3 bucket.
- If the email did not pass Amazon SES's spam and virus checks, then the Lambda function rejects it without further processing.
- Otherwise, the Lambda function checks that the From: address matches the email address of a user who belongs to the
circular-submitter
group. - The Lambda checks that the subject validates against a list of allowed and disallowed keywords.
- If all of the above checks pass, then the Circular is accepted, stored in the database, and distributed to GCN Circulars subscribers.
Support Requests
Source code: app/email-incoming/support
We use Zendesk for tracking user support requests. Users can submit support requests through our contact form or (soon) by sending an email to support@stage.gcn.nasa.gov.
We have configured support@stage.gcn.nasa.gov as an external support address for Zendesk:
- A Lambda function whose source code is in the app/email-incoming/support directory runs for each incoming email addressed to support@stage.gcn.nasa.gov.
- A copy of the incoming email is saved in an S3 bucket.
- If the email did not pass Amazon SES's spam and virus checks, then the Lambda function rejects it without further processing.
- Otherwise, the Lambda function forwards the email to our Zendesk account's system address.
When a GCN team member responds to a ticket in the Zendesk console, Zendesk sends the email from support@stage.gcn.nasa.gov. The stage.gcn.nasa.gov domain has SPF records to permit Zendesk to send emails from this address and to DKIM records to have Zendesk digitally sign messages.