Problem setting From Address with sendmail

I am using rt 5.0.3. I have been trying to setup rt with sendmail and postfix. my postfix configuration is alright since when i run a direct command with
(echo “Subject: Test Email”; echo “From: fromemailaddress”; echo “To: emailaddress”; echo; echo “This is a test email body.”) | /usr/sbin/sendmail -oi -t
I am able to successfully send an email. but when i try to create a ticket from within rt it makes the call , shows it is going to use the default email address i.e. dev@domain but when i check the mail logs it shows the from address as MAIL FROM:<“dev@root”@rt.regenenergy.io> SIZE=371
can someone please help me with why this is happening . i am also putting in my mail setting here

Mail Settings

Set($MailCommand, “sendmail”); # Use SMTP for sending mail
Set($SendmailArguments, "-oi -t ");
Set($SendmailPath, “/usr/sbin/sendmail”);
Set($CorrespondAddress, ‘dev@regenenergy.io’);
Set($CommentAddress, ‘dev@regenenergy.io’);

Not sure if this helps, but I also have set $OverrideOutgoingMailFrom