edit

I can se many L shaped parts:) not possible to ring it in? well anyway thank u for the answer. I will also mention that i've had it in for this problem before and i think that it where temporay fixed that time and i really don't want to send it in again but i you have to open it i'm not sure anymore if i wanna try this my self.

Then if u look at it u can se traces of a tool around the jacket on the chassi it self so isn't there a tool i can use without have to open the mac?

i edited a picture of the part in my post above. i don't think that you could easily use a "tool" to get this part into the right position. opening the imac with suction cups should leave no marks at all. i recommend a extension cable for the audio jack after you fixed it

Same problem here on an iMac (late 2012). Last week the headphone jack occasionally popped out the socket. Then one day it just cracked and was pushed inwards.

Went to a Apple retailer and they said I could return it to an Apple store. When it's proven it's not because of bad use (I switch between speakers and headphone once a day max, so it's not) they can fix it within 2,5 weeks for free (within 2 years European warranty). I think I just buy a new external sound card which I was already planning to do.

If anyone succeeds in fixing this I would like to hear. Maybe I give it a try.