Yes, this is a perfectly legal connection (otherwise they would not sell it). You are correct, you will arrive in 2E and will connect to 2F and yes, you will have to clear immigration. This is perfectly doable providing your incoming flight is on-time. Of course, do not loose time en-route. I have done similar connections multiple times in 20 min gate-to-gate. It of course depends on the length of the lines at immigration. Do you travel in J or do you have any status in a Skyteam FFP ? Because if yes, you can use the priority lanes (called SkyPriority / Accès N°1)