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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailx

Status
Not open for further replies.

solarisnj

MIS
Jun 7, 2005
3
US
I have two machine's (1)Ultra 5 with a class C ip address attach to a hub and (1) Ultra 10 with a class C ip address attach to a hub. I have both hostnames and ip's in the following file /etc/hosts and I also enable the console command under /etc/default/login. How can I use the mailx to send an email from the ultra 5 to the ultra 10.
 
mailx on Ultra5 will use the sendmail.cf configuration to send email to the U10. By default sendmail/mailx will use DNS record MX for your domain. If you don't run DNS inbetween these two hosts you need to set a Smarthost entry in /etc/mail/sendmail.cf to the U10's hostname. Copy /etc/mail/subsidary.cf to /etc/mail/sendmail.cf first!

Code:
eg U5 = hostA, U10 = hostB
[b]hostA#[/b] grep ^DS /etc/mail/sendmail.cf
DShostB.yourdomain.com
[b]hostA#[/b]

hostB needs to run sendmail to act as a MTA
-> copy /etc/mail/main.cf to /etc/mail/sendmail.cf

sendmail tries to determine the domainname from your hosts fqhn entry, that's why your /etc/hosts entry should always look like:

10.20.30.40 hostname hostname.yourdomain.com loghost

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years in the domain of the OS, Backup and Storage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top