I might be wrong, but I had the impression that the emails were written when he was still on active duty but the investigation was recent.
Yes, it’s possible both items are correct. The e-mails were written while Petraeus was on active duty but the investigation began after he was with the CIA.