I mentioned this elsewhere but this line of reasoning may have a huge flaw, and that flaw is that energy has to be spent to maintain the portals operation. We do not currently know what the relationship is between the amount of mass that is moved through a portal and how much energy it takes to keep the portal operational.
So when you take into account the total entropy of the system you also have to include the entropy of the earth and the entropy of the power systems that maintain the portals.
As I said earlier, if you were to put a magnet inside of a vacuum tube that was welded to itself through the portal and then wrapped coils around that tube to drain the electromagnetic energy from the falling magnet, the energy that you were extracting from the system would come from either converting the mass of the planet into energy or it would be a total net loss as the amount of energy needed to maintain the portal would be greater than any amount of energy you could extract from the system no matter how fast the magnet inside of it was moving or how perfectly configured your coils were.
After all, as the magnet approaches the speed of light eventually its mass would be come equal to or greater than the mass of the planet, and that would cause the portal to lift the Earth towards itself.
However, coils on electromagnetics exert electromotive braking Force, and when you account for e that Force you can prevent the magnet from reaching luminal speeds, but I still don't think you're going to have an over-unity device.