Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage identities in configuration #82

Closed
9 tasks done
Aerendir opened this issue Jul 19, 2018 · 0 comments
Closed
9 tasks done

Manage identities in configuration #82

Aerendir opened this issue Jul 19, 2018 · 0 comments

Comments

@Aerendir
Copy link
Owner

Aerendir commented Jul 19, 2018

In configuration is required the management of identities.

# Aws Ses Monitor
shq_aws_ses_monitor:
    endpoint:
        scheme: '%env(APP_SCHEME)%'
        host: '%env(APP_HOST)%'
    bounces:
       topic: 'tbme-prod-ses-bounces'
    complaints:
        topic: 'tbme-prod-ses-complaints'
    deliveries:
        topic: 'tbme-prod-ses-deliveries'

This is required to configure the identities and the SNS endpoints and to perform the checks and debugging, too

It is possible I want to handle more than one domain from another domain: think at a situation like you build an app on domain internalmailerapp.com that manages emails for domain app1.com and app2.com: they both send emails through internalmyapp.com that is, definitely, a mail server built by yourself.

Considering this, the bundle has to know which identities it is authorized to manage:

# Aws Ses Monitor
shq_aws_ses_monitor:
    endpoint:
        scheme: '%env(APP_SCHEME)%'
        host: '%env(APP_HOST)%'
    identities:
        - internalmailerapp.com: ~
        - app1.com: ~
        - app2.com: ~

With this configuration the bundle has to be able to configure the identities and to link them to SNS, creating the topics, confirming them, ecc...

In consequence of this, I need to be able to set the bounces, complaints and deliveries topics on a per identity basis.

The identities can be a domain or a single email.

Consider this SES identities:

Now, these are the considerations that come from this configuration:

  • The test email should be used only in dev
  • All the identities but the test@* should be configured and used only when in production (instead, the risk is to set a development topic - that maybe uses ngrok - and lose production notifications)
  • The test email should have its own topic so it is possible to test locally without risking of losing production emails
  • All the identities but the test@* can have the same topic to which deliver the notifications
  • The endpoint can be the same for more than one topic
  • I can have different topics for different notifications of different identities, but the endpoint MUST be always the same
  • The value of endpoint.host can be different from the domain of an identity
  • The bundle can automatically generate the names of topics
  • The bundle can use the name of a topic of domain identity also with the emails that have that same domain

All this considered, the new configuration should have this shape:

# Aws Ses Monitor
shq_aws_ses_monitor:
    endpoint:
        scheme: '%env(APP_SCHEME)%'
        host: '%env(APP_HOST)%'
    identities:
        trustback.me:
            # https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2010-12-01.html#setidentitydkimenabled
            dkim: true
            # https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2010-12-01.html#setidentityfeedbackforwardingenabled
            feedback_forwarding: true
            # https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2010-12-01.html#setidentityheadersinnotificationsenabled
            headers_in_notification: true
            # https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2010-12-01.html#setidentitymailfromdomain
            from_domain: www.trustback.me
            bounces:
                track: true
                topic: 'tbme-prod-ses-bounces' # autogenerated
                filter:
                    enabled: true
                    soft_as_hard: true
                    max_bounces: 5
                    soft_blacklist_time: 'forever'
                    hard_blacklist_time: 'forever'
                    force_send: false
            complaints:
                track: true
                topic: 'tbme-prod-ses-complaints' # autogenerated
                filter:
                    blacklist_time: 'forever'
                    force_send: false
            deliveries:
                track: true
                topic: 'tbme-prod-ses-deliveries' # autogenerated
@Aerendir Aerendir added this to the 2.0 milestone Jul 19, 2018
Aerendir added a commit that referenced this issue Jul 21, 2018
Fix #81: Automatically create the topic name.

ALERT: SwiftMailer filter doesn't work.
@Aerendir Aerendir self-assigned this Jul 21, 2018
Aerendir added a commit that referenced this issue Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant