If the leak is in the annular space (between the outside of the drain pipe and the inside of the sleeve), what should be there is a "link-seal". You wrap this rubber and steel gizmo around the smaller pipe, join the ends, slip it into the annular space and tighten bolts on each link to expand the rubber links and voila - the space is sealed very well (make sure surfaces are clean and use a supplementary sealant if the manufacturer recommends it). If the leak is around the outside of the sleeve, a mastic made for sealing basement walls below grade will do the trick, providing (as you have no doubt correctly figured) that it is applied to the outside of the wall, so that the hydrostatic pressure tends to force it into the gap rather than out of it.

: When the basement walls were poured a 6 - 8 inch metal pipe was set in the wall to maintain an opening: for running the 4 inch PVC sewer pipe through. The opening is not sealed properly and water leaks into : the basement. I have done all that I can to the inside wall and the leak is now only a trickle when it rains.: My question is, how should this have been sealed from the outside? I am going to dig down to the pipe : and attempt to fix the problem but I want to find out what the proper repair should be.