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

mailx rookie help

Status
Not open for further replies.
Dec 10, 2003
121
US
[dazed]
I am a rookie to UNIX and mailx and I am trying to send mail out accross our network to an outside email address from a Sun Solaris 5.8 server (mailx version is 5.0).

mailx -s &quot;subject&quot; whoever@anywhere.com < testfile.txt

This server has never been configured to send mail. I looked at the sendmail.cf file and noticed there is nothing for the: &quot;Smart&quot; relay host (may be null)
DS

I know I need something after the DS; what to put is a mystery to me. I know how to edit files but I'm not sure what I should be putting in for the mailhost.

We use Outlook here at work and I do know the Exchange server names and IP's. I've tried to telnet to our Exchange server using port 25 and I get a prompt but I don't know what to do beyond that.

1) What do I put in for Smart relay host?
2) Do I need a hosts file too?
3) Do I need to enable anything else to send mail out to the internet?
Any help would be greatly appreciated.
[dazed]
 
Don't edit the sendmail.cf directly, use the sendmail.mc file.
1. Smart_HOST is set up as follows in your sendmail.mc:
define(`SMART_HOST', `smtp.gateway.com')
this simply states all nonlocal mail should be forwarded to an smtp gateway for processing.
2. Yes you need a local-hosts-file .This should include all the aliases for your mail server.
3. You need a valid domain name & MX to send mail to the internet. You will also need to edit your access file to allow mail relaying for your domain and for mail seen as &quot;local&quot; by the mail server.

Cogito Ergo Sum - Non Compos Mentis
 
Thanks for the reply Rhinokiller!
I'm not sure what you mean by MX.
1. What does MX mean?
2. Where is sendmail.mc? I found sendmail.cf in /etc/mail, but I don't see sendmail.mc anywhere.

By the way this email traffic is only one direction, I just need to send text files out to an Internet address. No incoming mail is neccessary as I won't be checking the root mailbox anyway.

Thanks again!
 
MX = Mail Exchanger - it identifies your mail server on the internet. Even if you are just sending mail out to the internet you really do need a valid domain name & MX. This can be done using a &quot;domain literal&quot; configuration in Sendmail but I advise against it.
What version of sendmail r u running (if you telnet to port 25 on your sendmail server you should see it there) ?

Cogito Ergo Sum - Non Compos Mentis
 
senmail 8.11.6 + Sun/8.11.6
I don't connect directly to the Internet, I have to go through an smtp server which I now have in the sendmail.cf file and I put an entry into the hosts file to resolve this name for the smtp server.

Now it connects with the server but I don't think it can find it's way back to my Sun box. I'm trying to figure out how to add the MX.
 
Don't bother with the MX stuff now, your smtp gateway (ISP) is probably doing it for you.

Cogito Ergo Sum - Non Compos Mentis
 
I got it to work! Thanks for your help. I had a bogus entry in my hosts file that had an incorrect &quot;nickname&quot;. Once I took out the wrong domain name and put in the correct one it started working.

Thanks again for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top