Sendmail sending from hostname rather than domain name

I have an Apache 2.2 web server running on Ubuntu 6.06 LTS. I installed Sendmail using Webmin. Once it was installed, I selected "Send outgoing mail via host:" and I entered my email server, which is on the same network as the web server (public IP addresses for both servers). That is the only thing I changed. The problem is, I am using virtual hosts for 3 different websites, and I need to be able to use sendmail via php for each. Right now, when I send something, it says it came from I need this to come from for each virtual host on the server. What do I need to setup for this to work? Thanks!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sorry I'm not familar with SendMail, does this link cover anything important?
I'm very familiar with sendmail, but I don't use WebMin to manage it, and I have no idea how complete the control offered by WebMin is.

You're getting into virtual hosting, which can be complex to configure. You can use the genericdomain FEATURE of sendmail to re-write the envelope sender, but I have no idea if WebMin offers that as a configuration option.
Tharo_SystemsAuthor Commented:
I'm not against manually configuring it. I installed Webmin for the first time because I thought it would simplify things. I've never used it before. How do I go about trying the genericdomain feature? Thanks
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Check out my profile for links to some technical papers I've written.

In particular, looik at "Practical Modern sendmail Configuration" - which I wrote based on an Answer I gave to a Question some years back here on EE.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You will need to go to your file (most likely in /etc/mail)

Edit the file and look for the DM setting (Masquerade option), and cascade DM with the domain you wish to send from:

# who I masquerade as (null for no masquerading)

Save the file and restart sendmail
Tharo_SystemsAuthor Commented:
Sorry I took so long to close out the question. I've been very busy. Thanks for the helpful information!
No, DO NOT edit directly!

Edit and rebuild

Only masochists edit directly.

Your idea will do nothing if the MUA is canonicalizing the E-Mail before submission to the MSA.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.