dtgreene: 2. (non-EE) if you cast the spell on yourself, Spell Immunity is ignored; I note that casting maze on yourself could be a viable strategy in some cases (but make sure that you have at least one other living party member so that the game doesn't end)
Bookwyrm627: Maze on the main character is game over. No if's, and's, or but's. The only thing Mazing CHARNAME is good for is to see your essence float away during the game over animation.
Mazing any other party member might be a sub-optimal strategy to use in outrageous circumstances, but you'll never have to worry about lacking another living party member in that process.
IIRC, you're mixing up Imprisonment with Maze, which is easy enough to do as both have the same animation and are both rather similarly slim in terms of available defenses.
Imprisonment is indeed game over on the main character, as well as having other nasty side effects (party members struck are considered to be removed from the party at that very moment, so it will end romances and potentially even make you unable to re-recruit the NPC if your Reputation isn't fully compatible with their alignment at the time you cure it).
I at least remember Maze to be a temporary effect (the affected person remains in the roster and simply isn't available until they return when the spell ends) with no special game ending effect on CHARNAME (unless you are solo, in which case a lot of spell effects that are normally temporary nuisances become instant game enders).