Yeah, I found the solution.
For those who are looking for the same solution as me.
# cd /etc/mail
# make
# vi host.mydomain.com.mc
Change From: DOMAIN(generic)
Change To: DOMAIN(`mydomain.com')dnl
# cd /usr/share/sendmail/cf/domain
# cp generic.m4 mydomain.com.m4
# vi mydomain.com.m4
# echo "FEATURE(`masquerade_entire_domain')dnl" >> mydomain.com.m4
# echo "FEATURE(`masquerade_envelope')dnl" >> mydomain.com.m4
# cd ../feature
# echo "MASQUERADE_AS(`westsideweekly.com')dnl" >> masquerade_entire_domain.m4
# cd /etc/mail
# make
# make install
# make restart
Voila. You are done. Any mail sent via command line will appear as from
username@mydomain.com.
cheers,