Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mail from different domain name 1

Status
Not open for further replies.

fluid11

IS-IT--Management
Jan 22, 2002
1,627
0
0
US
I'm pretty new to Sendmail. I just set up Sendmail 8.11.6 on a Red Hat 7.3 server. When I send mail out, it appends the full name of my mail server --> @cp.domain.org. I want all outgoing mail to just use @domain.org.

Inside the /etc/mail/local-host-names file, I simply have 'domain.org'. Look at the following command...

[root@cp mail]# echo "$=w" | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> [1.2.3.4]
cp
domain.org
localhost.localdomain
localhost
cp.domain.org

Where is it getting all of this since all I have is domain.org in the local-host-names file?


Thanks,
ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
I've also added this to the sendmail.mc file and created the new sendmail.cf file...

MASQUERADE_AS(domain.org)dnl
MASQUERADE_DOMAIN(domain.org)dnl

In the sendmail.cf file, it creates the &quot;DMdomain.org&quot; entry. I've read that this all I have to do.

Outgoing mail is still sent as *@cp.domain.org.

I want to send mail as *@domain.org.


Any ideas? Am I missing something?


Thanks
ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
Do you mean that e-mail address are getting appended from:

user@domain.org to user@cp.domain.org

or do u mean that the server listed in the e-mail header is changed from

domain.org to cp.domain.org

If its the first check that your e-mail client program (ie Outlook) is setup with the correct e-mail address

If its the second then that is a DNS issue. Your ISP probably has that pc listed as cp.domain.org not domain.org you need to contact them.
 
I'm in control of my zone file on my ISP's server. There is nothing that says cp.domain.org. The problem is sending mail out, so I really don't think DNS is an issue. I can receive mail for either @cp.domain.org or @domain.org. Every record for my domain points to the same server, so *.domain.org will get resolved to my server.

I haven't used any 3rd party mail clients yet. I'm sending mail from the server using the 'mail' command. All mail goes out as user@cp.domain.org.


Thanks,
ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
&quot;I can receive mail for either @cp.domain.org or @domain.org. Every record for my domain points to the same server, so *.domain.org will get resolved to my server.&quot; --> Sorry, I messed this up. Its true that *.domain.org will get resolved, but I can only receive mail for cp.domain.org and domain.org, because that is whats listed in the class variable w (above, first post).


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
I just tested sending mail from an MUA and I'm not having any problems there. I can send from domain.org without any problems. I still can't send from domain.org from the command prompt at the Sendmail server.


------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
Send the mail using &quot;F&quot; option which will enable you to specify the FROM name.

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Thanks Butterfly123.

This isn't that important, but is it possible to make 'foo.org' the default domain when sending from the console?


Thanks,
Chris ------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
Well, if u know m4 programming, u can tweak with the code in sendmail.cf (under format of headers - section), u can fix the domainname for sending the mails out. I havent tried out this opton as of yet!

With Dj$wfoo.com option, sendmail will use it only if its not able to identify its own domainname.

Regds,



- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
[root@cp mail]# echo &quot;$=w&quot; | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> [1.2.3.4]
cp
domain.org
localhost.localdomain
localhost
cp.domain.org

Where is it getting all of this since all I have is domain.org in the local-host-names file? If I can have domain.org show up first, then I think that would solve my problem.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
What's in /etc/hosts? Sendmail may be peeking in there to find out what its name is. :)
 
Only loopback stuff is in /etc/hosts, but that was a good guess:)

Take a look at my Sendmail rant here --> thread14-340453 ------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top