How do I export my suppression list?
Page through the Suppressions API and write every address to a CSV file.
Newsletter tools such as Sendy, listmonk, and Mautic keep their own subscriber status. When they send through PostShiba over SMTP, bounces go to PostShiba, not to the tool. PostShiba suppresses hard bounces and spam reports and refuses later sends to those addresses with 550 suppressed, but the tool still lists them as active. Export the suppression list and import it into the tool's blocklist to keep your lists clean.
Before you start
- A Support API key and your Team id, both on API keys. A Support key can read suppressions and cannot send. See API keys.
curlandjq.
Export every address
The script pages through the Suppressions API 1,000 rows at a time, using the last row's id as after.
The file has one address per line and no header row.
Export by reason
Each row has a reason: bounce, spamreport, unsubscribe, or manual. To export only hard bounces and spam reports, change the jq filter.