configure sendmail to append domain

I am running redhat enterprise 4 with sendmail version 8.13. I am trying to configure sendmail to append the domain to localpart.

For example

If i send an email to �username�. I want sendmail to append the �username� with @bbl.com

I tried modifying the following in /etc/mail/sendmail.mc

MASQUERADE_AS(bbl.com)dnl
MASQUERADE_DOMAIN(bbl.com)dnl

Then issue
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restarted sendmail

Unfortunately the above modification did not work. At the moment when I send an email it changes the �To address field� to �username@hostname.domain.com� but I would like to be �username@domain.com�

What am I doing wrong? Can you help? Please

You want "canonical name", not "masquerading". My Sendmail skills are too rusty to help you with the details but quick googling suggests $j might have something to do with that.

Hi,
Try MASQUERADE_AS and FEATURE masquerade_envelope in both sendmail.mc and submit.mc ... Hope that helps