Skip to content

ReceiptFilter

Source: src/AWS/SES/ReceiptFilter.ts

An Amazon SES receipt IP address filter — an account-level allow/block rule for the source IP of inbound mail. Block filters take precedence over allow filters.

Filters are immutable: there is no update API, so any change to the name or the IP rule replaces the filter.

Block a CIDR Range

import * as SES from "alchemy/AWS/SES";
const filter = yield* SES.ReceiptFilter("BlockBadActors", {
ipFilter: { policy: "Block", cidr: "10.0.0.0/24" },
});

Allow a Single Address

const filter = yield* SES.ReceiptFilter("AllowPartner", {
ipFilter: { policy: "Allow", cidr: "192.0.2.10" },
});