This paper presents a resource-efficient protocol for opportunistic routing in delay-tolerant networks (DTN). First, our approach exploits the context of mobile nodes (speed, direction of movement and radio range) to estimate the size of a contact window. This knowledge is exploited to make better forwarding decisions and to minimize the probability of partially transmitted messages. Optimizing the use of bandwidth during overloads helps reduce energy consumption since partially transmitted messages are useless and waste transmission power. Second, we use a differentiation mechanism based on message utility. This allows allocating more resources for high utility messages. More precisely, messages are replicated in the order of highest utility first, and removed from the buffers in the reverse order. To illustrate the benefit of such a scheme, global accumulated utility is used as a system-wide performance metric. Third, we present a combined fragmentation/redundancy scheme which not only improves delivery ratio but also, if infrastructure is available, allows messages to be completed by pulling dropped fragments. Simulations illustrate the benefit of our model and show that our scheme provides lower overhead and higher delivery ratio, as well as higher accumulated utility compared to a number of well-known algorithms including Maxprop and SprayAndWait.