Early access

Searching on the server

How FOLD on iPhone and iPad continues a search on the mail server, and what it sends there.

FOLD searches the messages stored on your device. Server search is an optional second step for mail that is still only on the server. It exists on iPhone and iPad; the Mac app searches only its local store.

When it is offered

If some messages of an account have not been downloaded yet, for example older mail in an account that keeps only a recent period on the device, a bar appears below the search results: “Not all messages are available locally.” with the button Continue search on the server. FOLD never searches on the server by itself; only a tap on the button starts it.

What happens

FOLD translates your query into an IMAP search and runs it in every folder of every active account. For each folder it downloads the headers of up to 500 matches that are not on the device yet, newest first. Then it runs your local search again, so the new messages appear in the usual result list. The bar reports the outcome:

  • “Loaded one additional match from the server.” or “Loaded 12 additional matches from the server.”
  • “No additional matches on the server.”
  • “This search cannot be run on the server.”
  • “Server search is unavailable right now. Please try again later.”

What is sent to the server

Part of your queryServer criterion
Words and phrasesFull-text search on the server
from:, to:, cc:, bcc:, subject:The matching header field
body:The message body
is:unread, is:flagged and other status valuesThe matching flag
Tags (label:, is: with a tag)The matching keyword
before:, after:The sent date, widened by one day
Regular expressions, in:, account:, size:, has:, list:, file:, from-identity:Not sent

Parts that cannot be sent are left out. The server query is then broader than yours, and the local search afterwards applies your full query exactly. A query that consists only of parts that cannot be sent, such as a single regular expression, produces “This search cannot be run on the server.” Searches with characters outside ASCII are sent as UTF-8; servers without UTF-8 search support reject them with the same message.

Your search terms go to the mail server of each account. They do not go anywhere else.

Limitations

  • The server can find a word in the message text, but FOLD then filters the downloaded messages with its local index, which does not contain the text of received messages yet. A match found only in the message text can therefore be downloaded without appearing in the results.
  • Only headers are downloaded. The message itself loads when you open it.
  • The Mac app has no server search.