I recently insulated the rim joists in the basement which has made the temperature much more mild. Now that the Wisconsin winter has arrived, the pipe from the sump pump that travels outside is sweating so much that condensation is forming and dripping water onto the floor. There is also frost where the pipe is inserted through the header into the outside (the gap around the pipe through the header has been filled with spray foam).

My question is...will installing tubular pipe foam insulation stop the pipe from sweating or will the water just accumulate inside?