Avatar of markrhyman
markrhyman asked on

how to Configure and use Mail command


I am trying to use the mail command in the following way:
$ mail root < /tmp/db_reorg.log
$ 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.

Unix OS

Avatar of undefined
Last Comment

8/22/2022 - Mon

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


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.

This might be useful as well:


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

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.


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

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.

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.

You would need to add a default route with:

route add 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.

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 that I did add.
Your help has saved me hundreds of hours of internet surfing.

OK, so you can do:

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

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

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.

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
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

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.