• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 476
  • Last Modified:

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 whatever@hostname.domain.com. I need this to come from whatever@domain.com for each virtual host on the server. What do I need to setup for this to work? Thanks!
0
Tharo_Systems
Asked:
Tharo_Systems
1 Solution
 
PhatzerCommented:
Sorry I'm not familar with SendMail, does this link cover anything important?

http://www.sendmail.org/tips/virtual-hosting.php
0
 
PsiCopCommented:
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.
0
 
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
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
PsiCopCommented:
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.
0
 
hbustanCommented:
You will need to go to your sendmail.cf 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)
DMdomain.com

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

Edit sendmail.mc and rebuild sendmail.cf

Only masochists edit sendmail.cf directly.
0
 
PsiCopCommented:
@hbustan,

Your idea will do nothing if the MUA is canonicalizing the E-Mail before submission to the MSA.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now