But when I change the order to make def.com the primary and abc.com the secondary, firstname.lastname@example.org's email is being blocked. The error says "unable to relay mail." Def.com is not an external domain.
I need to migrate all users to email@example.com and secondary as firstname.lastname@example.org.
It sounds like some of your relay fields are not set up completely. Check your server configuration document. Wherever you see abc.com in relay fields, you should add def.com.
This was first published in June 2003