I'd like to rewrite the following entry:
dn: uid=user@olddomain.com,dc=olddomain,dc=com uid: user@olddomain.com mail: user@olddomain.com
to appear and behave like this:
dn: uid=user@newdomain.com,dc=newdomain,dc=com uid: user@newdomain.com mail: user@newdomain.com
I can get the DN rewritten with slapd-relay and rwm-suffixmassage, and can use rwm-rewriterule with the searchFilter and searchEntryDN contexts to return the entry when querying for mail=user@newdomain.com. But I can't figure out how to rewrite the *values* of the uid and mail attributes in the returned entry to user@newdomain.com. What is the best way to achieve this?
Thanks,
-Kartik