This question already has an answer here:
I have a 15-inch macbook pro that is mid-2012. The latest version of Mavericks is when the problem started, but it wasn't after the update to it. Just happened one day.
My problem started randomly one day when I tried using iMessage on my mac and all the contacts had turned red. So every time I try to send out a message from my mac, it would immediately say "not delivered."
iMessage works on my iPhone, the only problem is my macbook pro.
I have tried deleting the com.apple.ids.madrid file and that didn't work. I also tried removing my apple ID information from my phone, turning off iMessage on both of the devices, and placing my iPhone 5 in airplane mode for several minutes before turning it on and re-logging in. I can't figure out what the problem is.
I've made sure I'm logged in to my Apple ID, it's nothing like that. I've also tried creating a separate Apple ID just for the purpose of iMessage, but that did no good either.
Please help, it's been weeks and it has become very inconvenient!