Avatar of markrhyman
markrhyman asked on

how to Configure and use Mail command

Hi,

I am trying to use the mail command in the following way:
$ mail root < /tmp/db_reorg.log
OR
$ echo "Coming home for dinner!" | mail sylvia@home.com
to send a file that is generated automatically everyday by the UNIX machine.  I do not get any error message when I use the above command but I never get the email to the destination address.  I guess that the UNIX machine is not properly configured to send email in that way.

I would like assistance on this problem please.

Mark
Unix OS

Avatar of undefined
Last Comment
markrhyman

8/22/2022 - Mon
mikelfritz

SCO 5.0.7 uses mmdf by default, seel the mmdf section for an overview here:

http://aplawrence.com/Companion/Chapter10.html

It looks like your first command (sending to root locally) should be fine.  The second would most likely fail as mmdf does not use smtp and dns by default.  If you go into scoadmin and then mail you will see all of the options.  You will have to tell mmdf to allow smtp and to use dns to look up names.
mikelfritz

This might be useful as well:

http://www.webservertalk.com/message206685.html
ASKER
markrhyman

Thanks for your support.  However, I am going crazy.  Please know that I am very new to UNIX and I do not even know how to run a lot of commands.

I tried to run mkdev mmdf and I get mkdev: /usr/lib/mkdev/mmdf not found

Then I tried to go to custom to see if the MMDF is installed, but there I got completely lost.

HELP!!! :)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
mikelfritz

How about run "scoadmin" from the console.  then go down to mail and see if it lists mmdf or sendmail - that will let us know how to move on.

ASKER
markrhyman

Hi mikefritz,

I did run scoadmin and in mail there is SendMail Configuration only
When I select that option I have a menu with:

1 Edit UUCP connections
2 Edit Domain
3 NIS support
4 Edit Alternate Host Names
5. Miscellaneous items
6 Set up X.400 Gateway Configurations
7 Review Configuration information
8 Generate sendmail.cf file
9 quit
mikelfritz

OK - two must do's:

set the domain name

go under 5)misc and then 4)internet - answer yes to that.

then 8)gen sendmail.cf

Make sure you have a route to the internet with "netstat -r"  and can ping by name to verify DNS.

Try to send a mail and see what happens.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
markrhyman

I did the steps and generated the file.

I cannot ping anything outside the office LAN.  I get Ping: unknown host google.ca

I did answer y to the question 4) internet.
mikelfritz

You would need to add a default route with:

route add 0.0.0.0 X.X.X.X

Where X.X.X.X is the gateway on the network.

You will also need to see if there is a /etc/resolv.conf file - that is where basic DNS would be.  The format should be:

nameserver Y.Y.Y.Y

Where Y.Y.Y.Y is the name servers IP address.

You can check a PC that works on the Internet to see the gateway and DNS info.
ASKER
markrhyman

Thank you very much for your support.

I did add the route of my default gateway and still no success to Ping the outside world

Afterwards I did check for a resolv.conf and found none.  I only have a resolv.conf.sample file

In the netstat I see the gateway 192.168.1.1 that I did add.
Your help has saved me hundreds of hours of internet surfing.
fblack61
mikelfritz

OK, so you can do:

echo "nameserver Y.Y.Y.Y" > /etc/resolv.conf

where Y.Y.Y.Y is the nameservers IP address
ASKER
markrhyman

Mikelfritz,
I think this is starting to work for me.  I did the last command you told me and I can ping google.ca

Then I tried mail myemail.ca < /tmp/backlog

I got the email.

I have 2 questions left for you.
1. Do I have to perform the steps: route add... and the echo "nameserver"... all the time the Unix server reboots?  If yes, how can I set this up to be somehow permanent?

2. the email seems to be originating from Superuser(root@LANDomain.myemaildomain.ca)

Can I change the FROM somewhere?

You have been of an extreme help up to now and I am very grateful to you.
ASKER CERTIFIED SOLUTION
mikelfritz

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
markrhyman

Thanks a lot.  You were of a great and excellent help
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.