Creating a configuration
Create a configuration to set up email processing rules:
- Email operation notifications.
- Mandatory TLS encryption.
- Engagement statistics collection.
- Statistics breakdown by sending scenarios.
-
In the management console
, select the folder containing the address. -
Navigate to Cloud Postbox.
-
In the left-hand panel, select
Configurations. -
Click Create configuration.
-
Enter a name and (optionally) a description of the configuration.
-
Under Subscriptions, click Add:
- Enter a name for the subscription.
- Select the Yandex Data Streams data stream to send email operation notifications to. If you do not have a data stream, create one.
- Select the types of notifications you want to receive.
- Select the Enabled option to activate the subscription.
You can add multiple subscriptions.
-
To send emails from Yandex Cloud Postbox to recipient servers using only TLS encryption, enable Delivery settings under Deliver emails only via secure connection and specify the minimum TLS version.
Warning
If the recipient's server does not support the specified TLS version, the email will not be delivered.
-
To collect statistics on email opens and clicks, enable Engagement statistics under Statistics collection settings. All other statistics, other than email opens and clicks, are collected by default.
Note
Enabling Engagement statistics will modify the email body. For more information, see Tracking email openings and Click tracking.
-
Click Create configuration.
If you do not have the AWS CLI yet, install and configure it.
To create a configuration, assign the postbox.editor role to the service account used for the AWS CLI.
-
In the terminal, define these variables:
ENDPOINT=https://postbox.cloud.yandex.net PROFILE=<profile_name> CONFIGSET_NAME=<configuration_name> IDENTITY=<domain> KINESIS_ENDPOINT=https://yds.serverless.yandexcloud.net/ru-central1/<folder_ID>/<YDB_database_ID> TOPIC=<data_stream_name> -
Create a configuration:
aws sesv2 create-configuration-set \ --endpoint-url=$ENDPOINT \ --profile $PROFILE \ --configuration-set-name $CONFIGSET_NAME -
To receive email operation notifications, add a subscription to the configuration:
aws sesv2 create-configuration-set-event-destination \ --endpoint-url=$ENDPOINT \ --profile $PROFILE \ --configuration-set-name $CONFIGSET_NAME \ --event-destination-name <subscription_name> \ --event-destination "{\"Enabled\":true,\"KinesisFirehoseDestination\":{\"DeliveryStreamArn\":\"arn:aws:keenesis:::$KINESIS_ENDPOINT:$TOPIC\",\"IamRoleArn\":\"arn:\"}}"You can add multiple subscriptions.
To apply your configuration to all emails sent from a specific address, associate the configuration with that address.