Using the mapping cone of a rational surgery, we give several obstructions for Seifert-fibered surgeries, including obstructions on the Alexander polynomial, the knot Floer homology, the surgery coefficient and the Seifert and four-ball genus of the knot. These generalize the corresponding results in Kronheimer, Mrowka, Ozsvath and Szabo ['Monopoles and lens space surgeries', Ann. Math. (2) 165 (2007) 457-546] and Ozsvath and Szabo [On Heegaard Floer homology and Seifert fibered surgeries, Geometry and Topology Monographs 7 (Geometry and Topology Publications, Coventry, 2004)].