How to setup Sendmail as SMTP Relay?

Hi Guys,

I want to setup sendmail using my username and password on my ISP to be able to send out messages.

I'm using Linux. So far, what I've done is modified the sendmail.mc with the following changes:

define(`SMART_HOST',`myispsmtpoutgoingserver')
FEATURE(authinfo)dnl

In my /etc/mail/authinfo, I have the following:

AuthInfo:mysmtpoutgoingserver "U:myusername@myispdomain" "I:myusername@myispdomain" "P:mypassword" "M:PLAIN"

Now whenever I try sending by executing a simple sendmail command:

cat sendmail.mc | sendmail "myotheremail@gmail.com"

I always get a Sender Rejected error mail back.

(reason: 550 5.1.8 <root@mylocaldomain>: Sender address rejected: Domain not found)

This is actually true as the mylocaldomain is not a public Internet domain. Just a localdomain for our local network. However, I was expecting that to change to the username in my authinfo "myusername@myispdomain" since this account is authorized to send out email with my ISP.

Any ideas on how I can do this?

Thanks.