Skip to content

Best Practices

Tim Csaky edited this page Feb 13, 2023 · 12 revisions

SMTP Best Practices

Behind the scenes, the Common Hosted Email Service dispatches SMTP email messages to the apps.smtp.gov.bc.ca SMTP server which is managed by OCIO. Before you consider using CHES for your line of business needs, please review the following information regarding the best practices and general fair use limits for the apps.smtp.gov.bc.ca SMTP server.

There is a change to the onboarding process for the BC Government's hosted CHES service. If you will be calling the CHES API from outside the SPANBC network (for example if your application is not running on OpenShift and is hosted on Azure or AWS cloud) you must make an IStore request for a consultation with OCIO Messaging (the underlying SMTP service provider) before requesting your API credentials. Book your consultation through your service desk (Office Productivity > Consulting Services > Messaging and Collaboration - Consulting) or email [email protected].

Resources

CHES Usage

When using CHES, only government messages are allowed. You should only be using domains that OCIO Exchange hosts such as @gov.bc.ca or one of the other 60 plus domains that they manage. If you have requirements to send emails outside of that, please note that OCIO will not be updating their core SPF, DMARC or DKIM records with client server IPs as that is not permitted.

Requests to CHES API must originate from an IP address within the BC Government's SpanBC network. If your application is hosted outside of the SpanBC network (for example: in AWS or Azure) OCIO may be able to find you an alternate solution.

Submit the iStore Office Productivity Consulting Order with Messaging to investigate using an existing hosted domain or setting up a separate domain for your custom sending needs. This has the benefit of configuring the SPF, DMARC and DKIM records with your server IP addresses.

Rate Limits

While the CHES API is designed to be flexible and scale based on load demand, there are still general usage rate guidelines you should follow as recommended by OCIO for the underlying SMTP server:

Parameters Limits
Recipient rate limit 10,000 recipients per day
Recipient limit 500 recipients
Recipient proxy address limit 400
Message rate limit 30 messages per minute

Submit an iStore Office Productivity Consulting Order with Messaging at the beginning of the build if your line of business is expecting to exceed the limits in this table.

CHES has no limit on number of attachments but each attachment is currently limited to 20mb (at least until we can integrate with COMS!) but the smtp server has a '100MB size attachment restriction'. There are no restrictions on attached file types except the file needs to be encoded as 'base64', 'binary' or 'hex' encoding.

Spam Considerations

It's worth remembering that all every spam filter out there is different depending on the client or service you use. Here are some general recommendations:

  • Don't include textual spam triggers. (E.g. suspicious words in the subject or body.)
  • Use your own variation of a "no-reply" sender address. ([email protected] is reserved. You could for example use [email protected] instead.)
  • Consider the format of attached files. (E.g. zip files could trigger spam filters.)
  • Use a tool to check your email "score" (E.g. https://www.mail-tester.com/.)
Clone this wiki locally