This paper presents an approach for exchanging presence information between users of an instant messaging system in a mobile ad hoc network. As major feature, presence information is transferred when mobile users get in direct contact, similar to the spread of an infections disease. By exploiting node mobility, presence information is epidemically distributed throughout the network, effectively overcoming network partitions. We show how to apply the Passive Distributed Indexing Protocol, which implements a general-purpose lookup service for mobile applications building upon epidemic data dissemination, for implementing the exchange of presence information. The effectiveness of the approach is illustrated in a simulation study using the network simulator ns-2. Building upon the results, we present the architecture of a mobile instant messaging system that supports the widely adopted Extensible Messaging and Presence Protocol (XMPP), an IETF standardized protocol for instant messaging.