Creating a configuration
Create a configuration to receive email operation notifications.
-
In the management console
, select the folder containing the address. -
Select 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.
-
Under Delivery settings, enable Deliver emails only over a secure connection and specify the minimum TLS version to send TLS-only encrypted emails from Yandex Cloud Postbox to the recipient's servers.
Warning
If the recipient's server does not support the specified TLS version, the email will not be delivered.
-
Under Statistics collection settings, enable the Engagement statistics option to collect statistics on email opens and clicks. 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 -
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 get notifications, link the configuration to an address.