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

Is it possible to send e-mail with attachments on SCO?

Status
Not open for further replies.

Elminster

Programmer
Jun 26, 2001
78
CA
Hi there,
Is it possible to send an e-mail with an attachment from a Unix SCO computer with out installing any software? If so can someone tell me the name of the command to use?

Thanks in advance for all your help.
-Simon
 
It is possible providing you installed the basic mmdf e-mail support with your system. The script below is an example of sending an e-mail with an attachment using this method. The UNIX uuencode utility encodes the e-mail attachment.

Code:
#!/bin/sh
(
echo "From: <myaddress@mydomain.com>"
echo "To: <destaddress@destdomain.com>"
echo "CC: <ccaddress@ccdomain.com>"
echo "BCC: <bccaddress@bccdomain.com>"
echo `date '+Date: %a, %d %b %Y %H:%M:%S'`
echo "Subject: subject_of_email"
echo "Message-Id: <"`date '+%d%m%y`$$".cpcwa.org>"
uuencode name_and_path_of_attached_file name_of_attachment_shown_in_e-mail
) | /usr/mmdf/bin/submit -tmnrxto,cc,bcc*
 
Thanks a lot apeasecpc for the prompt answer. I’ve tried the code that you gave me and I had this error message:

submit: (BHST) Unknown host/domain name in "pipus91@hotmail.com"
submit: message submission aborted

I tried it with and without the <> with the same result. I believe that my MMDF is not configured properly. I’m not an Unix expert so does anybody know of an good HowTo on the subject? Also, I don’t have a test computer, if I make a mistake, can I damage my SCO Unix installation on my production computer.

Thanks for all your help.
 
It looks like your system is not set up for DNS resolution. Is your server configured for access to the internet? Go into the gui on the consol and try to launch Netscape to see if you can get out.
 
Ok … well is it possible that when I set up the DNS resolution the server stop looking in the host file?

Here’s my situation, I tried accessing the internet by netscape and it didn’t work. So I decided to try to set up the DNS even if I didn’t have a test computer. Once set up, Netscape work fine, but I still couldn’t send e-mail(I had the same msg as earlier). Shortly after (1 or 2 minutes) I started receiving phone calls from all my offices telling me that the where not able to print anymore.( we are using a software that sent the print job to remote computers to be printed in other city’s and that software use the host file.)

So to solve my more urgent problem, I had to remove everything I did for the DNS configuration.

Obviously, I wont try this again until I get my hand’s on a test computer. In the mean wile, if you have any thought, I’ll be happy for the extra info …

Thanks a lot for your help, even if it didn’t solve my problem, I understand a bit more the nature of the problem.

Regards
-Simon
 
What kind of WAN do you have for your remote computers?

Your printing problem may be related to routing. The host file just tells the system what address to go to, not how to get there. It could be that your adding the DNS caused the print jobs to go out over the public internet instead of their correct routes. If this is the case you can resolve it by adding the necessary route tables to your SCO server.

It is also possible that you set some configuration in your DNS setup to override the hosts file, but I am not familiar with how you might have done this.
 
man resolv.conf

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
As already stated, you MUST have mmdf or sendmail installed and configured on your server.

A typical /etc/resolv.conf has:

domain [yourdomain.com]
nameserver [primary dns ip]
nameserver [secondary dns ip]
hostresorder local bind

Of course, you need to set your default gateway. This is done using command route like so:

route add default [ip address]

It is a good idea to add a script in /etc/rc2.d to do this automatically as you boot the server. You can name script something like S190defroute and give it a 755 mode.

Once you have your DNS set and your default gateway identified, you should be able to ping Doing so and getting a reply means you have external access.

Now, sending the email depends more on your SMTP server than it does on your gateway - SMTP could be configured to use smart relay and simply have a second server do the job.

It would help to know if you are using mmdf or sendmail. I would suggest you look into 'mutt' as your mail agent. Sending attachments with it is very simple and it uses proper MIME headers (using uuencode does not guarantee that receipients will actually get an attachment - they often get a block of text which is impossible to read).

Like more things in our field, there are thousands of ways to skin the cat ... Got a sharp knife?

Just let us know about your topology and versions you're using and we just might be able to provide you more direct assistance.

Regards;


Jose Lerebours

KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top