There have been differing reports on how long Randy's contract with the UFC extends to, but his resignation from the UFC now means that Randy might be able to fight Fedor in M-1, the promotion that Fedor just signed with.
I have to imagine that M-1 would jump at the chance to get Randy for a fight with Fedor, after all, Randy is probably the biggest name in MMA.
It might be able to happen within the next 12 months.