The IMEI partition should be rewritten using official tools from Samsung Support center or at the service center for your carrier. If you have a copy of the old EFS partition, you can rewrite it using EFS PRO. The tool has been officially released at XDA Forums. Visit the website and download the application, connect your phone and enable USB Debugging and then click on RESTORE > Select IMG/TGZ file and start the operation. It's illegal to rewrite the phone's IMEI with one from another phone.