The draw was made this morning
Mayo will have home advantage against Fermanagh in the pick of the All-Ireland SFC Round 2B qualifying fixtures.
Stephen Rochford's side face Fermanagh on 9 July after they were knocked out of the Connacht SFC by Galway last weekend.
Cork, meanwhile, will take on Limerick after their exit from the Munster championship at the hands of Tipperary.
Conor McManus' late show for Monaghan means they will face Donegal again in the Ulster championship and the loser there will face Longford in the qualifiers.
There'll be an all-Leinster clash when Kildare face Offaly. Cian O'Neill's side were beaten by Westmeath yesterday afternoon.
Mayo v Fermanagh
Donegal/Monaghan v Longford
Kildare v Offaly
Limerick v Cork