Nigeria and South Africa are in Group E with Libya and the Seychelles while Tunisia and Egypt are in Group J with Niger and Swaziland.
Both Nigeria and South Africa failed to reach the 2017 Cup of Nations tournament, which kicks off in Gabon Saturday with a fixture between the host country and Guinea-Bissau.
Nigeria lost out to Egypt after taking only one point from the two matches between countries who have won 10 of the previous 30 competitions.
South Africa held eventual group winners Cameroon twice, but finished an embarrassing third after losing and drawing against minnows Mauritania.
Both blockbuster pairings are repeats of 2015 qualifiers with Nigeria and South Africa drawing twice and Tunisia defeating Egypt home and away.
Ghana and Kenya are in Group F with Ethiopia and Sierra Leone and the Democratic Republic of Congo and Congo Brazzaville share Group G with Zimbabwe and Liberia.
Group L comprises decades-old east African rivals Uganda and Tanzania plus Cape Verde and Lesotho.
There will be three two-leg preliminary ties during March involving the six lowest ranked sides with the overall winners securing places in the group phase.
One round of mini-league fixtures are scheduled for 2017 and five for next year with the 12 group winners and the best three runners-up joining hosts Cameroon in the finals.
Draw
Preliminary round
Sao Tome e Principe v Madagascar
Comoros v Mauritius
Djibouti v South Sudan
Note: home and away matches to be played between Mar 20-28 and overall winners qualify for group phase
Group A
Senegal, Equatorial Guinea, Sudan, Sao Tome or Madagascar
Group B
Cameroon, Morocco, Malawi, Comoros or Mauritius
Group C
Mali, Gabon, Burundi, Djibouti or South Sudan
Group D
Algeria, Togo, Benin, Gambia
Group E
Nigeria, South Africa, Libya, Seychelles
Group F
Ghana, Ethiopia, Kenya, Sierra Leone
Group G
Democratic Republic of Congo, Congo Brazzaville, Zimbabwe, Liberia
Group H
Ivory Coast, Guinea, Central African Republic, Rwanda
Group I
Burkina Faso, Angola, Botswana, Mauritania
Group J
Tunisia, Egypt, Niger, Swaziland
Group K
Zambia, Mozambique, Guinea-Bissau, Namibia
Group L
Cape Verde, Uganda, Tanzania, Lesotho
Notes
— Group winners and best three runners-up qualify for tournament with hosts Cameroon
— Cameroon will compete in Group B and points awarded in their matches. If Cameroon win group, the runners-up will qualify; if they finish runners-up, the winners will qualify; if they finish third or fourth, the winners will qualify and the runners-up will compete for one of the three additional places
Matchdays
2017
June 5-13
2018
Mar 19-27, Sept 3-11 (two), Oct 8-16, Nov 5-13
Download our app and read this and other great stories on the move. Available for Android and iOS.