Let Gamma be a totally ordered abelian group and I an order ideal in Gamma. We prove a theorem which relates the structure of the Toeplitz algebra T(Gamma) to the structure of the Toeplitz algebras T(I) and T(Gamma/I). We then describe the primitive ideal space of the Toeplitz algebra T(Gamma) when the set Sigma(Gamma) of order ideals in Gamma is well-ordered, and use this together with our structure theorem to deduce information about the ideal structure of T(Gamma) when 0 --> I --> Gamma --> Gamma/I --> 0 is a non-trivial group extension.