\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{Known ActiveSync Issues}
Most entries here describe \textbf{client bugs}, \textbf{protocol limitations}, or \textbf{deployment misconfiguration} -- not Horde application defects. When in doubt, enable per-device ActiveSync logging and check the web server access log before assuming a server bug.

See also <a href="https://wiki.horde.org/ActiveSync">ActiveSync</a> (setup, Autodiscover, troubleshooting) and <a href="https://wiki.horde.org/ActiveSync/FeatureGrid">ActiveSync Feature Grid</a> (what Horde supports by EAS version).

\section{Deployment and Autodiscover}
These are the most common \textbf{operator} issues mistaken for Horde bugs.

\subsection{Autodiscover fails despite Horde working on the mail host}
Autodiscover is keyed off the \textbf{email domain} (\texttt{user@example.com} -> \texttt{example.com}), not necessarily the hostname where Horde lives (\texttt{mail.example.com}). If \texttt{autodiscover.example.com} or \texttt{example.com} points at a vhost without \texttt{rpc.php} routing, the client receives \textbf{404} and setup fails.

Other frequent causes:

\begin{itemize}
\item Rewrite rules are \textbf{case-sensitive} -- iOS sends \texttt{/Autodiscover/Autodiscover.xml} (lowercase \textbf{d} in the middle). Rules must use \texttt{[NC]} or equivalent.


\item A non-Horde vhost includes ActiveSync rewrites to \texttt{/horde/rpc.php} that does not exist in that docroot, which blocks \texttt{RedirectMatch} rules that should send traffic to the real Horde host.


\item Missing routing for \textbf{Autodiscover v2 JSON} (\texttt{GET .../autodiscover.json/...}) -- a \textbf{404} here is normal; clients fall back to v1 XML. v1 must return \textbf{401} without credentials when routing is correct.


\end{itemize}
See the \textit{Autodiscover} section on <a href="https://wiki.horde.org/ActiveSync">ActiveSync</a> and verify with \texttt{curl} (401 on \texttt{POST .../autodiscover.xml} = routing OK).

\subsection{Autodiscover not supported or implemented incorrectly on the client}
Not all devices support Autodiscover; some send broken requests (e.g. older Android builds passing the full email address as the HTTP Basic username without XML body). Horde works around several of these where possible. If Autodiscover still fails, configure the account manually -- usually only the server hostname and credentials beyond the email address.

\section{General synchronization}
\subsection{NOTICE: «Previous request processing for synckey ... failed to be accepted by the client»}
This appears in the Horde log when a client re-sends a request with a \texttt{SyncKey} the server has already advanced. The client either never received the prior response or rejected it. The library removes the stale state and retries.

If this is \textbf{occasional} and sync works, it is normal. Frequent repetition usually means network problems, proxy timeouts, or a buggy client stuck in a loop -- check reverse-proxy \texttt{Ping} timeouts and per-device logs.

\subsection{Outlook 2013: «This folder hasn't yet been updated»}
Outlook 2013 over EAS may show \textit{This folder hasn't yet been updated, connection attempt} even when sync is fine. Often caused by the \textbf{Outlook Mail Notifier} add-in (\texttt{OutlookChangeNotifierAddIn.dll} from Apple Mobile Device Support). Disabling that add-in resolves it.

\subsection{Provisioning loops}
Some clients enter a loop when provisioning is required but mishandle policy key updates (historically certain iOS 4.3 builds). If a device cannot complete setup when provisioning is \textbf{Force}, try \textbf{Allow} or \textbf{None} for testing, or use per-user permissions to exempt the account.

\subsection{Client throttle after repeated KEYMISMATCH / state resets}
Broken clients that ignore server state resets may loop until the server escalates to \texttt{KEYMISMATCH} or errors. Horde 6 includes guards for some loop types (e.g. \texttt{FOLDERSYNC\_REQUIRED} spam); persistent loops are still ultimately a client or provisioning issue -- remove device state in admin UI and re-pair after fixing the underlying cause.

\section{Improved in Horde 6 (may no longer apply)}
If you are on an older Horde release, these may still bite you; on \textbf{Horde 6 / ActiveSync 3.x} they are largely addressed:

<table class="horde-table">Symptom & Horde 6 change \\
\hline
iOS mail \textbf{Ping} loops / duplicate mail sync & PING watermark separated from SYNC modseq \\
\hline
Endless \textbf{FolderSync} / status 12 loops & \texttt{FOLDERSYNC\_REQUIRED} loop guard in sync cache \\
\hline
Corrupt device state / mysterious KEYMISMATCH & Corrupt \texttt{sync\_data} rejected and repaired; SQL/Mongo row locks \\
\hline
iOS \textbf{Notes} multiplexing oddities & Modern iOS Notes collection behaviour updated \\
\hline
Recurring calendar \textbf{exceptions} on newer clients & EAS **16.0** instance model when client negotiates >= 16.0 \\
\hline
</table>
Clients stuck on EAS 14.x or below do not benefit from the calendar instance improvements.

\section{Mail}
\subsection{iOS Mail: «This message was downloaded as plaintext»}
Large messages may show \textit{This message was downloaded as plain text} with a broken «download full message» action. This is an \textbf{iOS client limitation}. Opening attachments individually usually works.

\subsection{Cannot delete mail on iOS}
iOS may try to move messages to a local Trash folder instead of issuing a server move. If no Trash folder is configured on the device, delete fails. Configure IMP to use a \textbf{Trash mailbox} and ensure the device syncs that folder.

\subsection{Duplicate citation lines in replies}
Some clients prepend their own «On ... wrote:» line while ActiveSync \textbf{Smart Reply} also includes quoted history, producing duplicates. Client-side behaviour; not harmful to data on the server.

\subsection{Broken Autodiscover auth on some Android clients}
Some Android builds send the email address as the HTTP username without a valid Autodiscover XML body. Horde attempts workarounds; manual account setup may still be required.

\subsection{Cyrus IMAP \texttt{BINARY} extension}
ActiveSync mail sync may fail against \textbf{Cyrus IMAP 2.4.x before 2.4.17} due to a BINARY extension bug (<a href="https://bugzilla.cyrusimap.org/show_bug.cgi?id=3718">Cyrus \#3718</a>). Workaround in IMP backend config:

<pre><code class="language-php">\$servers['advanced']['capability\_ignore'] = ['BINARY'];
</code></pre>
\section{Calendar}
\subsection{Yearly recurrence by day-of-year}
EAS does \textbf{not} support «every X years on day N of the year» (1-365/366). Only same calendar date yearly, or nth-weekday-of-month patterns, are defined. Horde maps unsupported patterns to «once every X years» without correct day-of-year placement.

\subsection{Recurring event exceptions on iOS}
Historically \textbf{iOS 6.x-7.x} mishandled exceptions (using internal GUIDs, corrupting series). \textbf{Modern iOS} negotiating \textbf{EAS 16.0+} with Horde 6 uses the instance model and is greatly improved, but edge cases remain -- especially on series with many exceptions or cross-timezone all-day events. See Apple and Microsoft discussions: <a href="https://discussions.apple.com/thread/4736007">Apple thread</a>, <a href="https://support.microsoft.com/kb/2563324">MS KB 2563324</a>.

\subsection{Truncated event descriptions on iOS}
iOS may sync a \textbf{truncated} calendar body and later send that truncated text back on edit, overwriting the full description on the server. EAS 16.0 defines \texttt{ItemOperations} fetches for calendar bodies, but clients must request them -- \textbf{iOS has not reliably done so} as of recent testing. Avoid editing long descriptions on device when truncation is suspected.

\subsection{Meeting invitations and COUNTER proposals}
EAS \textbf{16.1} propose-new-time (\texttt{METHOD=COUNTER}) requires clients that negotiate >= 16.1. Older clients only support accept/decline/tentative without counter proposals.

\section{Contacts}
\subsection{Contact photo removed after edit on iOS}
Some iOS versions send an \textbf{empty} \texttt{Picture} element when a contact is edited, clearing the photo in Turba. Reported around iOS 6-9; behaviour has regressed in some later versions. Workaround: re-add photo from the web UI or avoid editing photo-bearing contacts on device.

Horde skips picture updates when iOS sends no \texttt{Picture} tag and the client does not advertise incremental contact updates (\texttt{ghosted} support).

\subsection{Birthdays offset by one or more days}
ActiveSync does not standardise the time-of-day for birthday fields. Clients send midnight UTC, local midnight, or other variants. Horde adjusts by detected client where possible (\texttt{Horde\_ActiveSync\_Device} birthday handling); mismatches can still appear on uncommon clients or after iOS/Android updates.

\section{Tasks}
\subsection{Outlook \texttt{Regenerate=1} not supported}
Outlook may send \texttt{Regenerate=1} on recurring tasks (regenerate next instance after completion). Horde/Nag use \texttt{completions[]} and fixed RRULE semantics -- \textbf{regenerated due dates are not implemented}. Completed instances sync; regenerated series behaviour on Outlook may diverge.

\section{Protocol / server limitations (not client bugs)}
<table class="horde-table">Topic & Status \\
\hline
SMS sync & Stubbed -- prevents broken clients from breaking mail \\
\hline
Conversation view / segments & Not implemented \\
\hline
Nickname cache & Not implemented \\
\hline
\texttt{ItemOperations:Schema} & Ignored -- no known client requires it \\
\hline
HTTP 503 / \texttt{X-MS-Throttle} & Not implemented \\
\hline
</table>
\section{Historical client issues (legacy reference)}
These affected \textbf{old} clients and are listed for archive searches only. Current iOS/Android versions are unlikely to hit them:

\begin{itemize}
\item \textbf{iOS 6 push mail} -- push failed; meeting response bugs (fixed in iOS 6.0.1+ for many cases).


\item \textbf{iOS 4.2.1 contacts} -- picture handling without \texttt{ghosted} announcement.


\item \textbf{Windows Mobile / Android 2.x} -- see removed device matrix on <a href="https://wiki.horde.org/ActiveSync">ActiveSync</a>; not tested on Horde 6.


\end{itemize}
When reporting a new issue, include EAS protocol version (\texttt{MS-ASProtocolVersion}), device type, per-device log excerpt, and whether Autodiscover or manual setup was used.

\end{document}
