Send emails with Keila
Add PostShiba as an SMTP sender in Keila.
What you'll build
A Keila sender that delivers your campaigns through PostShiba over SMTP. Keila keeps your contacts, forms, and unsubscribe links. PostShiba delivers the mail and suppresses addresses that hard bounce or report spam. This works on self-hosted Keila and on Keila Cloud.
Before you start
- A Marketing cluster. Newsletters belong on a bulk cluster, not a transactional one, and the type is locked after create. See Clusters.
- An SMTP username and password. Open your cluster in the dashboard, go to its SMTP credentials, and choose Create SMTP credential. Copy the password right away, because it is shown once. You can also use the SMTP credentials API.
- A verified sending domain. See Add and verify a domain. The sender's From address must be on it.
- A cluster that is ready to send (
sending_readyistrue).
Install
Nothing to install. Keila has SMTP support built in.
Pick a plan for your largest list
PostShiba caps each cluster per hour and per rolling 24 hours. The 24-hour cap must cover your largest list plus anything else the cluster sends that day. Keila holds messages back once a sender reaches its Rate limit per hour, so set it to your hourly cap.
| Plan | Emails per hour | Emails per 24 hours | Keila Rate limit per hour |
|---|---|---|---|
| Nano | 100 | 600 | Test sends only |
| Micro | 4,000 | 24,000 | 4,000 |
| Small | 40,000 | 240,000 | 40,000 |
| Medium | 100,000 | 600,000 | 100,000 |
| Large | 200,000 | 1,200,000 | 200,000 |
Keila opens a new SMTP connection for every message, and PostShiba allows 100 new sessions per username in 10 seconds. Set Rate limit per second to 8 on every plan to stay under that.
When a cap is full, SMTP answers 451 4.7.0 hourly send limit reached or 451 4.7.0 daily send limit reached and does not keep the message. Select Resize on the cluster page before a campaign that would go over. See What happens at your cap.
Send your first email
- In Keila, open Senders from the menu and choose Create. On Keila Cloud, Keila walks you through a short setup instead: choose Custom, then SMTP, enter the values from step 3, and open the sender again afterwards for step 4.
- Fill in Sender name, From address, and From name. The from address must be on your verified domain.
- Open the SMTP tab and enter these values. Choosing STARTTLS in Connection security sets Port to
587. The username starts withsmtp_.
- Set Rate limit per second to
8and Rate limit per hour to the value for your plan in the table above. Choose Save. - Create a campaign with the new sender. Open Send & Schedule → Send preview and enter your own address. The message shows under Events in the PostShiba dashboard.
Every SMTP setting is on Send emails with SMTP.
System emails on self-hosted Keila
Self-hosted Keila sends sign-up and password reset emails through a separate mailer set with environment variables. These are app notifications, so use a username and password from a Transactional cluster, not the Marketing one. MAILER_SMTP_FROM_EMAIL must be on a domain verified on that cluster's tenant.
Keila reads them at startup, so restart Keila after you change them.
Bounces, complaints, and unsubscribes
Bounce emails go to PostShiba, not to Keila. With an SMTP sender, Keila does not learn about bounces or complaints, so PostShiba stops the mail instead.
| Event | What happens |
|---|---|
| Hard bounce | PostShiba suppresses the address. Later sends to it are refused with 550 suppressed. |
| Spam report | PostShiba suppresses the address the same way. |
| Soft bounce | PostShiba retries delivery. Nothing is suppressed. |
| Unsubscribe | Keila adds its own List-Unsubscribe header to campaign emails, plus List-Unsubscribe-Post when Keila runs on HTTPS, so PostShiba leaves them alone. Keila marks the contact as unsubscribed. |
Suppressed addresses still look active in Keila. PostShiba refuses them, so they never reach a mailbox, but they stay in your contact counts. Mark them unreachable in Keila now and then to keep your lists clean. Keila only sends campaigns to active contacts.
Copy suppressions into Keila
Keila's CSV import skips any row whose status is not active, so it cannot mark contacts unreachable. Use the Keila API instead.
- Export every suppressed address to
postshiba-suppressions.csv. Follow How do I export my suppression list?. It takes a read-only Support key and one script. - In Keila, open API Keys from the menu, create a key, and copy it. It is shown once.
- Run this script. It sets each address that exists in Keila to
unreachable. Addresses Keila does not have return404and are skipped.
On self-hosted Keila, set KEILA_URL to your own Keila address. Run the script again after each large campaign. Marking an address that is already unreachable does no harm.
Troubleshooting
| What you see | What to do |
|---|---|
| Authentication fails | Check the username and password. Set Authentication to Password and Connection security to STARTTLS on port 587. Port 465 with SSL/TLS is not offered. PostShiba accepts AUTH PLAIN only. |
| The preview never shows under Events | The campaign uses another sender. Open the campaign settings and pick the PostShiba sender. |
550 unverified domain or 550 from header not aligned with verified domain |
Set the sender's From address to an address on your verified domain. |
550 kyc_required |
Your team is pending production approval. Until then, send only to team members, live inbox addresses, and inbox forward-to addresses. See Does PostShiba require production approval?. |
550 suppressed |
The contact hard bounced or reported spam. Copy suppressions into Keila as shown above. |
451 4.7.0 hourly send limit reached or 451 4.7.0 daily send limit reached |
The cluster is at its cap and did not keep the message. Lower the sender's Rate limit per hour, or resize the cluster before the next campaign. |
451 4.4.5 too many sessions, slow down |
Keila opened too many SMTP connections on one username in 10 seconds. Lower the sender's Rate limit per second. |
Next steps
- What happens at your cap
- How to manage suppressions
- How do recipients unsubscribe?
- Send emails with SMTP for every setting and reply.