--- type: Guide title: Inbound mail to your Rails app (ActionMailbox) description: Route addresses or wildcard patterns on a Euromailing inbound domain to a Rails application's standard ActionMailbox relay ingress. resource: https://euromailing.com tags: [inbound, actionmailbox, rails, routing] timestamp: 2026-07-06T00:00:00Z --- # Inbound mail to your Rails app Euromailing pushes raw inbound mail (message/rfc822) to your app's standard **ActionMailbox relay ingress** — no custom webhook code. ## In your Rails app 1. `bin/rails action_mailbox:install && bin/rails db:migrate` 2. `config.action_mailbox.ingress = :relay` (production.rb) 3. Set a long random ingress password in the credentials: `action_mailbox: { ingress_password: … }` 4. Route like any ActionMailbox source: ```ruby class ApplicationMailbox < ActionMailbox::Base routing(/^support@/i => :support) end ``` ## In Euromailing (dashboard) 1. Verify an inbound domain (MX to Euromailing's mail server). 2. Create a workflow with the **Inbound message** trigger. In *recipient local parts* choose what to route: - `support` — exactly support@yourdomain - `*.inbound` or `ticket-*` — glob patterns - `*` or empty — catch-all Precedence: exact address beats pattern beats catch-all, so a catch-all never double-handles mail a dedicated workflow owns. Optional JSON filters match on subject/from/headers before delivery. 3. Add the **"Deliver to your app (ActionMailbox)"** action with your relay URL (`https://your-app.example/rails/action_mailbox/relay/inbound_emails`) and the ingress password (stored encrypted). Delivery retries automatically while your app answers 5xx; a 401 means a wrong ingress password, a 404 usually a wrong URL. Because a workflow drives the push, you can filter, branch or tag in Euromailing before mail reaches the app — and route different addresses to different apps.