1830565 Members
4960 Online
110014 Solutions
New Discussion

MailX and email address

 
SOLVED
Go to solution
RedBack
Frequent Advisor

MailX and email address

I have a number of scripts that call mailx and send and email. The emails are being sent but I need to change the domain name on the senders address. Where do I change this?
9 REPLIES 9
Christopher McCray_1
Honored Contributor

Re: MailX and email address

Hello,

mailx gets the domain name locally, so /etc/resolv.conf would be where you would make this change.

Hope this helps

Chris
It wasn't me!!!!
RedBack
Frequent Advisor

Re: MailX and email address

There is a file /etc/mail/sendmail.cf that has the incorrect domain name. What does this file do?
Christopher McCray_1
Honored Contributor

Re: MailX and email address

Hello again,

also look at /etc/mail/senmail.cw and /etc/mail/aliases

Chris
It wasn't me!!!!
Hai Nguyen_1
Honored Contributor

Re: MailX and email address

If you do not use DNS then /etc/hosts is the file you need to edit to reflect the Domain name change.

Hai
RedBack
Frequent Advisor

Re: MailX and email address

the /etc/resolv.conv has the correct domain name.
Sajid_1
Honored Contributor

Re: MailX and email address

hi,

senmail.cf is the default configuration file which is used by sendmail program. I think you should look at these man pages to get a good idea:

# man sendmail
# man mailx
learn unix ..
MANOJ SRIVASTAVA
Honored Contributor

Re: MailX and email address

Hi MArk

All you ahve to do is to cahnge the name is /etc/mail/sendmail.cf to the one you want to use . Please make sure that the exchange server name is resolved properly.


Manoj Srivastava
Christopher McCray_1
Honored Contributor
Solution

Re: MailX and email address

I believe these are the lines you are referring to:

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM


Like it says... I would comment this out and see if you are getting the correct results.

Hope this helps

Chris
It wasn't me!!!!
Hai Nguyen_1
Honored Contributor

Re: MailX and email address

Mark,

Look into the /etc/mail/sendmail.cw file as well. You may have to update some entries which has the domain name associated with them.

Hai