sendmail masquerading on AIX.

I have a requirement wherein I need to change the "received from" address parameter for outgoing mails from an AIX server. I tried using the [mail -r] option to specify the "reply-to" address, still my relay server rejects the mails as the "received from" address still contains [root@localhost].

I know, this can be done by sendmail masquerading, however I'm not sure how to configure this on AIX - though I've done it on Linux regenerating the ~/sendmail.cf file from ~/sendmail.mc using m4 utility.

You can build the sendmail.cf in a similar way that you did Linux.
Look in /usr/samples/tcpip/sendmail for the cf and m4 libraries.

Take the "sample.cf" and tailor it a bit.
It has been a long time, but I did get the masquerade stuff to work.
We do not currently use this configuration now, as we have a mail filter
appliance that handles our outside routing.

NOTE: The user "root" is NORMALLY excluded from this rule by the "CE"
entry. That will need to be commented out if you want it to participate
with the masquerade.