That's the message in your opinion so it's far from being "very clear" to the rest of the world. If you think Iran is watching the Iraq occupation and quaking in their boots I'd have to disagree. Most likely they are probably laughing at watching us dump billions of dollars and the lives of servicemen against an enemy that multiplies like a virus.
Any message of deterrent would have been gleaned in the initial bombing and invasion of the country and not the occupation. Moreover, that's presuming the Iranian government is led by rational people who would react logically to displays of superior force. In my opinion we could have nuked Iraq off the face of the Earth and Iran would still be pursuing a nuclear weapons program and planning or at least sheltering terrorists planning future attacks against the United States.