We derive the optimum method for locating a single packet in a received frame of symbols, using not only the samples that correspond to a known preamble but those of the entire transmitted packet. This approach leads to significant improvements compared to detection methods based on the preamble alone. For BSPK and on-off keying and their combinations with Manchester coding, we present simplified maximum likelihood metrics which are near-optimum while their computational complexity is only slightly higher than a simple correlation. Finally, we show how this metric can be derived for other modulations with memory.