Custom MockUp animation to Unreal Engine rig

Hello!
I need to retarget animation from custom mockup rig to UE4 rig. How can it be done and where? in UE4 or Maya?
(From the left, selected rig to right)
Thanks!