EventideSystems / tool_for_systemic_change

GNU Affero General Public License v3.0
6 stars 0 forks source link

Change mail config to Mailjet #898

Closed ferrisoxide closed 1 year ago

ferrisoxide commented 1 year ago

Describe the task

Per request from @emily-humphreys, we need to change the mail configuration to use a different provider than MailChimp.

Mailjet has proven to be a reasonable mail service provider - currently in use on Brocade.io - is reasonably priced (free for > 200 emails per day).

https://www.mailjet.com/pricing/

We will need to get a separate account set up under Emily/WickedLab's name.

We will also need to able to access the DNS registration for wickedlab in order to configure SPF and DKIM settings.

Tasks

Tasks for @emily-humphreys

Tasks for @ferrisoxide

Tasks for @SishaMish

Success Criteria

ferrisoxide commented 1 year ago

@emily-humphreys I've removed the API keys from Github and stored them somewhere safe, but was that for MailChimp, or MailJet?

emily-humphreys commented 1 year ago

That was the new MailJet keys.

And thanks for the safety 👌👏

On Tue, 10 Oct 2023 at 8:06 am, Tom Tuddenham @.***> wrote:

@emily-humphreys https://github.com/emily-humphreys I've removed the API keys from Github and stored them somewhere safe, but was that for MailChimp, or MailJet?

— Reply to this email directly, view it on GitHub https://github.com/ferrisoxide/wicked_software/issues/898#issuecomment-1753917924, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFVZOXJIUNDRT2D7JA43UDX6RU4DAVCNFSM6AAAAAA5T4MSTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJTHEYTOOJSGQ . You are receiving this because you were mentioned.Message ID: @.***>

ferrisoxide commented 1 year ago

DEV NOTE

Namecheap isn't allowing a DKIM / TXT record with a dot at the end of the hostname. There should be a TXT record that looks like this:

Host: mailjet._domainkey.wickedlab.com.au. Value: k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD8/nYIBr0vVn+GgwxE3AoRxPuZKzXR4fNQlFk43jly0subw+/K7W5ri9slErPa08hptLRMLJ1VO/dGu+V/16wyxRCc05R2ZsPGnxmxkyOdARKIyYKyc17uRkDm+GUwSHf6C9PNRMXxWBZECEjqoLObTE15/5Br6KiOFypQyrUukQIDAQAB

The only way I can get this to save is by removing the trailing . (dot) at the end of the Host. This doesn't appear to work though, because on refreshing the Mailjet config it reports that the "There seems to be an error with your DomainKey record."

ferrisoxide commented 1 year ago

DEV NOTE

Have sent created a support ticket with namecheap on @emily-humphreys 's behalf. Ticket id is #VFM-473-73179. Text as follows:

Hi there

I'm trying to add a TXT record for DKIM for the wickedlab.com.au domain. The credentials provided by Mailjet are as follows:

Host: mailjet._domainkey.wickedlab.com.au. Value: k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD8/nYIBr0vVn+GgwxE3AoRxPuZKzXR4fNQlFk43jly0subw+/K7W5ri9slErPa08hptLRMLJ1VO/dGu+V/16wyxRCc05R2ZsPGnxmxkyOdARKIyYKyc17uRkDm+GUwSHf6C9PNRMXxWBZECEjqoLObTE15/5Br6KiOFypQyrUukQIDAQAB

Note the trailing dot at the end of the host name. This is the literal string provided by Mailjet.

If I try to add this host the panel tool complains about the validity of the host name. If I remove the dot it saves, but then checking the DKIM record via Mailjet reports "There seems to be an error with your DomainKey record."

Is there any way I can save the DKIM record as is, with the trailing dot? Any advice appreciated.

ferrisoxide commented 1 year ago

NOTES TO QA

@emily-humphreys @SishaMish

Code and configuration changes for Mailjet is up on staging and ready for QA. I've tested resending invitations and password reset. Both appear to be working.

NB the emails as now "unstyled" and very plain (e.g. no logo presented). If required we can look at restyling afterwards, as Mailjet uses a different approach than how MailChimp styled emails.

We still have an outstanding issue with the DKIM settings on namecheap. I've created a support ticket on your behalf @emily-humphreys - if they are able to provide any advice please let me know. We may be OK without it, as the SPF record is sound - DKIM just gives us an extra bit of assurance that emails will be delivered properly.

emily-humphreys commented 1 year ago

Sure thing, I'll keep you posted on ticket update if we hear anything from Namecheap. Would be great to have DKIM as getting these emails has been an issue in the past....

On Wed, Oct 11, 2023 at 5:10 PM Tom Tuddenham @.***> wrote:

NOTES TO QA

@emily-humphreys https://github.com/emily-humphreys @SishaMish https://github.com/SishaMish

Code and configuration changes for Mailjet is up on staging and ready for QA. I've tested resending invitations and password reset. Both appear to be working.

NB the emails as now "unstyled" and very plain (e.g. no logo presented). If required we can look at restyling afterwards, as Mailjet uses a different approach than how MailChimp styled emails.

We still have an outstanding issue with the DKIM settings on namecheap. I've created a support ticket on your behalf @emily-humphreys https://github.com/emily-humphreys - if they are able to provide any advice please let me know. We may be OK without it, as the SPF record is sound - DKIM just gives us an extra bit of assurance that emails will be delivered properly.

— Reply to this email directly, view it on GitHub https://github.com/ferrisoxide/wicked_software/issues/898#issuecomment-1756932032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFVZORVZWXROBSXJFZLLQLX6Y5MZAVCNFSM6AAAAAA5T4MSTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWHEZTEMBTGI . You are receiving this because you were mentioned.Message ID: @.***>

ferrisoxide commented 1 year ago

@emily-humphreys We're ready to cut over and then retest on production. DKIM issues aside, do you want us to go ahead now?

ferrisoxide commented 1 year ago

@emily-humphreys I just checked, and the Mailjet DKIM record is now appearing as the default record. We'll keep an eye on it, but it looks like we should be fine.

ferrisoxide commented 1 year ago

@emily-humphreys @SishaMish

This has been deployed to production. I've checked the email mechanism by re-sending an invitation and all appears to be working as expected. Closing.