Hello,
Removing primary addresses
We've made a script in such a way that it would not remove the primary address from a mailbox, and this was done on purpose. Removing a primary address is not a good idea at all, because if you remove the primary SMTP address from a user, the mailbox becomes corrupted.
Since you are going to remove that email domain completely, we can suggest that for those mailboxes that have the primary address in the domain the script would replace the primary addresses to a certain default address, for example, in the format %mailNickName%@newmaildomain.com, where newmaildomain.com is some default mail domain for such mailboxes.
Removing Forward To
Do you want to remove the forwarding address only from those mailboxes that have any addresses in the abc.com domain or from all mailboxes? Also, should the script remove the forwarding address only if it set to the abc.com domain or not? Could you provide as much detail as possible?