Is every group an ideal class group of a number field? The inverse Galois problem asks whether every finite group appears as the Galois group of some finite extension of $\mathbb Q$. I was wondering to what extent the analogous problem for ideal class groups has been investigated. More precisely, consider the following question:

Is every finite abelian group the ideal class group of some number field (finite extension of $\mathbb Q$)?

I'd be interested to hear about any partial results, as I suppose this question is still open. I'd be also interested in any results about a weaker problem:

Is every positive integer the ideal class number of some number field?

Again, any reference, even to a partial result, will be appreciated.
 A: The recent paper by Homlin, Jones, Kurlberg, McLeman, and Petersen (Experimental Math., to appear) is devoted to these questions especially in the context of imaginary quadratic fields.  One should expect that every natural number arises as the class number of an imaginary quadratic field.  Refining an earlier conjecture of Soundararajan, in this paper a precise asymptotic is formulated for the number of imaginary quadratic fields with a given class number.  They also formulate conjectures on what kind of groups can arise as class groups of imaginary quadratic fields -- for example, one expects that for any odd prime $p$, $({\Bbb Z}/p{\Bbb Z})^3$ is not the class group of any imaginary quadratic field.  The paper gives much data on such questions together with many related references. 
A: Just for the sake of completeness, here I am posting the answer of Pete Clark which was posted in the math.SE question. I am making this post CW so as not to create the unseemly impression that I am gaining any undeserved reputation from this. Here it is:

Virtually nothing is known about the question of which abelian groups can be the ideal class group of (the full ring of integers of) some number field.  So far as I know, it is a plausible conjecture that all finite abelian groups (up to isomorphism, of course) occur in this way.  Conjectures and heuristics in this vein have been made, but unfortunately for me I'm not so familiar with them.
The situation for imaginary quadratic fields is different.  Here there is an absolute bound on the size of an integer $k$ such that the class group of an imaginary quadratic field can be isomorphic to $(\mathbb{Z}/2\mathbb{Z})^k$.  Conditionally on the Generalized Riemann Hypothesis, the largest such $k$ is $4$.  This has do to with idoneal numbers, of which the following paper provides a very fine survey:
http://www.mast.queensu.ca/~kani/papers/idoneal-f.pdf
Actually the truth is slightly stronger: let $H_D$ be the class group of the imaginary quadratic field $\mathbb{Q}(\sqrt{-D})$.  Then, as $D$ tends to negative infinity through squarefree numbers, the size of $2H_D$ (the image of multiplication by $2$) tends to infinity.  See for instance
http://arxiv.org/PS_cache/arxiv/pdf/0811/0811.0358v2.pdf
for some recent explicit bounds on this.

A: For $S$-class groups: 
Perret, Marc
On the ideal class group problem for global fields. Zbl 0933.11053
J. Number Theory 77, No. 1, 27-35 (1999). 
https://zbmath.org/?any=&au=perret&ti=On+the+Ideal+Class+Group+Problem+for+Global+Fields&so=&ab=&cc=&ut=&an=&la=&py=&rv=&sw=&dm=
