The migration runbook says how to build the incoming connection and handler in order (inbound side). This post is the reference for how the rule tree behaves once built, and the habits that keep it running. The templates it feeds are in the templates post.
An Email This Issue Cloud mail handler is a tree of conditions and actions, run top to bottom against each incoming message. It has no try/catch, a failed action abandons the rest of the tree, and the user an action runs as is chosen from the sender, not from you. Those three facts explain most of the surprising behaviour.
Scope note. This is a reference compiled from Appfire's Cloud documentation, which I checked against the handler settings pages as I wrote, together with what I learned running a helpdesk handler. Where I could not find Cloud documentation, or the documentation I found was for the Server and Data Center product, I say so, and the last section lists everything inferred or untested.
How the Tree Executes
- Order. Conditions and actions run “in that order they appear on the list on the left side.”
- Children versus siblings. A Set field value action under Create issue, Update issue or a transition runs “together with the parent action in a single step,” in a single transaction, “to avoid sending several ‘Issue updated’ notification emails.” Siblings are separate steps, with separate permission checks and separate notifications. For a JSM request, a child field must be on the request type and visible on the portal, and Assignee cannot be set at creation.
- Failure. The Incoming Mail Log records the action's error, then
ERROR: Last handler action failed, stop further processing.Appfire's example is a JSM validation error, “Please provide a value for required field ‘Priority’.” Triggers include permission failures (customer rights, internal visibility, the suppress-notifications permission) and Jira or JSM field validation. Appfire notes the logs “may not reflect” the root cause, so read the line before the stop message. - No try/catch. I found no continue-on-failure flag or error branch documented. The only recovery is Fallback to default reporter, below.
- The top level. An action outside every IF and ELSE runs for every message that passes the filters, including replies. That is how an old auto-reply I had at the top level duplicated notifications. Keep the top level empty.
- Multiple handlers per connection. Reject filters give a status of SKIPPED. An accepting handler runs to SUCCEEDED or ERROR. If none accepts, the mail is FILTERED_OUT. Appfire advises one handler per connection.
The “Runs As” Problem
The executing user is chosen from the From address, and the documentation is consistent on the rules:
| Sender | Who the actions run as |
|---|---|
| Maps to a Jira user (agent or customer) | That user: “the Reporter for creating issues, the Author for adding comments, the user who executes transitions, and so on” |
| Maps to a user, but the action is not permitted | The Default Reporter, if one is set and Fallback is enabled |
| Not found, Default Reporter set and Fallback on | The Default Reporter |
| Not found, no Default Reporter or Fallback off | “Execution is aborted” |
Fallback to default reporter. If a handler action fails with a permission error, “the entire action will be retried with the permissions of the Default Reporter.” It is a per-handler setting and the only recovery mechanism there is.
What a portal customer can do. Appfire says that, because of Jira's permission handling, a customer “cannot update a request even if the reporter is the customer itself.” In practice a customer can raise requests, add public comments, and view requests they report or participate in. They cannot edit fields, add internal comments, move work through agent workflows, suppress notifications or manage watchers. The exact set is Atlassian's, and I did not re-verify every item.
There is no per-action “run as” in Cloud. The levers are Fallback, the Default Reporter's permissions, and the Assets macros' $runAsUserName, which applies to templates only.
What follows for the design
- Customer path. Only create request (with portal-visible child fields), public add comment, and add to request participants. Every action on that path must be something a portal customer can do, or something you accept running as the Default Reporter.
- Update issue cannot work as a portal customer, and the option to suppress Jira's built-in notifications on it also needs Administer Jira or Administer Project. Removing that action from a customer path was correct.
- Fallback ON makes updates and transitions “work,” but attributes them to the Default Reporter. Suppression would then need Administer Project rights on a service identity driven by untrusted email. Keep suppression out of the handler and control noise with notification triggers, as in the templates post.
- Agent-only branches. Wrap field updates in Sender is member of any of the project roles for the agent role.
- Shared addresses. Appfire logs a warning when an agent and a customer exist with the same email address. Avoid the duplicates.
Guard the “issue exists” branch
Key lookup is always active and searches the whole Jira instance (see the templates post). So a customer replying to a notification from another project, or a subject that happens to contain a key-shaped string, can attach mail to an unrelated issue. Put an Issue matches query condition, for example project = HD, in front of the add-comment action, and send other matches to an ELSE.
Conditions and Actions, as a Reference
The Cloud handler has four tabs: General handler settings, Filters, Find issue, and Rules and actions. Conditions can be nested and combined into groups with AND and OR, which the newer interface “highly encourages.”
| Condition | Checks | Notes |
|---|---|---|
| Check if any of the finders fit an issue | Whether a lookup found an issue (“exists” or “NOT found”) | The branch condition |
| Check if an issue is previously created by the Mail Handler | That an issue was created earlier in this run | Targets the issue just created |
| Email content matches | Java regex on body, subject, a named header (case-insensitive; a missing header means false), To, Cc, To/Cc, From address, From name | Routing, such as test versus live by the To address |
| Issue field matches | Status only, equals or not equals | False when no issue is in context |
| Sender has NO access to the issue | Browse Projects permission; request participants count | Global permission if there is no issue |
| Sender is member of any of the groups | Group membership | |
| Sender is member of any of the project roles | Role in a project | Agent-by-email branches |
| Issue matches query | JQL on the issue in context | Confines matches to the right project |
| Email sender is unknown | No Jira account; a disabled account counts as unknown |
| Action | What it does | Use it when |
|---|---|---|
| Create issue / request | Project; issue or request type; split regexp; attachment handling; attach the original .eml. Empty bodies still create (a placeholder if Description is required) | IF issue NOT found |
| Set field value (child of Create, Update or Transition) | Field; append or overwrite; content from the email (body, subject or header, with regex groups), a manual value (empty clears on update), or participants' addresses and names | Summary, Labels |
| Update issue | Container for Set field value; optional “Suppress Jira's built-in notifications” (needs Administer Jira or Project) | Agent-only branches, or with Fallback |
| Add comment | Split regexps (each as /…/, applied after conversion to wiki format); visibility (JSM internal or public, roles, groups); attachment handling; .eml | IF issue exists |
| Send auto-reply | Template; From address and name; sends as the Default Reporter by default | A mail-only acknowledgement |
| Execute workflow transition | Transition; Set field value children. Detailed options unverified | For example, reopen on reply; customers usually need Fallback |
| Create customer | Creates a JSM customer | Before adding new addresses as participants |
| Add to Request Participants / Add sender | Adds To, Cc or From as participants, granting customer access; “does not add newly created customers” without Create customer | Cc'd colleagues |
| Save senders/recipients to fields | Stores addresses or users in custom fields | External-participant tracking |
| Approve / Decline request | JSM approval by email. Options unverified | Approvals |
Around the tree sit Global Sender Address Filters, Attachment Filters (filename regex) and the Handler Filters on the Filters tab. Link issue and Add watchers are not documented as Cloud handler actions. Test whether Set field value accepts Watchers on your site, and use Jira Automation for linking.
Testing a Handler
The Test Handler button. I found it documented for Server and Data Center, not Cloud. Appfire's Cloud page on adding and editing handlers lists only the cog (filtering, finding issues, rules and actions), the pencil (general settings), the status toggle and delete. The Server and Data Center version lets you upload an .eml file, and Appfire says “this is an ordinary mail handler execution, therefore it is only to be used for testing purposes.” It is not a dry run. If your Cloud interface has the button, assume the same: use a test project, check the log, and delete the test issues.
Two connections, one handler
The general settings allow several incoming connections on one handler. The benefit is identical rules and no drift between test and live. The trade-offs are real: test mail creates real tickets and live notifications, lookups are site-wide, and a Create action's project is fixed per action, so the test branch needs its own Create. The recipe:
- Bind both connections to the handler.
- At the top level: IF To matches the test address, run the test-project create and comment actions. ELSE, run the live tree.
- After each change to the live branch, copy it into the test branch before testing.
Two traps
- Only mail that is unread when ETI fetches it is processed. If someone opens the shared mailbox first, the message is silently missed.
- The first run on a new connection downloads “every email from the target folder.” Start with a clean folder. I cover this in the silent-failures post.
Reading the Incoming Mail Log
In Administration, the log can be searched by expression, key, sender or subject over 7, 15, 30 or 90 days or all time, with 10 to 1,000 results.
| Category / status | Meaning |
|---|---|
| fetch email | “A temporary storage status for emails just being processed” |
| filter email / Skipped | Stopped by a filter; the detail names which |
| execute handler / Succeeded | All actions completed; shows the resolved user and the branch taken |
| execute handler / Failed | Read the line before Last handler action failed, stop further processing |
A message that is absent from both the log and the Incoming Mail Queue was never received, usually because it was read in the mailbox first.
Running It in Production
- Throughput. Appfire says average processing “may take 5-7 minutes, depending on the actual load of all customers.” The Advanced Edition reduces it to 1 to 2 minutes, and on Microsoft mailboxes can use Graph change notifications so mail is pushed immediately. I found no documented Cloud volume or size cap; the Server “Large emails” filter is not available in Cloud.
- Monitoring. Configure alerting through webhooks. Built-in Opsgenie and Slack templates exist, or a custom one. Alerts cover outgoing mail in the Error Queue, incoming connections that cannot download, handler failures and filtered mail. A persisting incident re-fires only after a one-hour window, and webhook logs are deleted after 90 days. It is the only push signal you have for silent failures.
- Queues. Failed outgoing mail can be requeued from the Cloud Error Queue. Automatic retry (15-minute intervals, 3 attempts) is documented for Server and Data Center only, so check the Error Queue daily. The Succeeded incoming queue keeps 90 days. Skipped and Failed are not limited.
- The configuration does not travel. Appfire: “The Backup and restore feature is only available for server and data center versions.” Atlassian's sandbox page lists Marketplace apps and their data among the things that are not copied, and an open Atlassian suggestion states that Marketplace app data cannot simply be copied between two cloud sites. So the configuration lives only in production. Rebuild by hand, and after any sandbox copy disable or repoint the mail connections. The Mail Handler Overview button exports the rules in HTML, JSON and image formats, so store one after every change, and keep template HTML in version control.
- Server-to-Cloud migration. The tool “supports only full migration,” and “all old data on Email this Issue Cloud side will be lost once the migration is done.” Never rerun it against a live Cloud site.
- Habits. One handler per connection. An empty top level. A project JQL guard on “issue exists.” Recipient Restrictions so that nobody can select a broad group like jira-users. And check that JSM's built-in customer notifications do not duplicate Email This Issue's.
What Is Documented, Inferred, or Unverified
Documented by the vendor (Cloud): execution order; child versus sibling actions; the failure message; Fallback to default reporter; how the executing user is chosen; multiple connections on one handler; the lookup order and site-wide scope; the log statuses; the monitoring, queue and backup behaviour above.
Documented for Server and Data Center only: the Test Handler button and its .eml upload; automatic retry of failed outgoing mail; the Backup and restore feature; the Large emails filter.
Inferred: that there is no try/catch (nothing documented says otherwise); the exact set of things a portal customer can do; that Link issue and Add watchers are absent in Cloud (I did not find them documented).
Options I could not verify: the detailed options of Execute workflow transition and Approve / Decline request, and whether Set field value accepts Watchers.
Not tested end to end by me: the two-connection, one-handler test recipe as written.
Closing Thoughts
Treat the tree as code that has no error handling and runs as whoever sent the mail. Keep the customer path to three things a customer can do, put a project guard in front of every “issue exists,” and keep the top level empty. Then keep a copy of the whole thing somewhere outside Jira, because the product will not.
← All guides