APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds RSS Feeds











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
->
-> Simple smtp mail client for SCO Unix


Simple outgoing email for SCO Unix (and Linux)




As SCO sinks into oblivion, the prospect of configuring MMDF or Sendmail becomes decidedly unnatractive. MMDF is ancient and keeping even reasonably up to date on Sendmail can be extraordinarily difficult. As there are very definite security considerations, you really don't want to be running old versions, but unless you really are a masochist, compiling new versions for SCO is far from fun.

If the only need is for emailing stuff from scripts, there's really no reason to run MMDF or Sendmail. Why deal with the security issues at all if the server doesn't need incoming Internet email? That's just one more attack vector that a creaky old SCO system does not need.

On Linux systems, I've been using CleanCode Email. It's slick and simple and does the job, but I haven't tried compiling it on SCO (it did compile easily on Mac OS X, though), and you may not have SCO compilers anyway.

When I happened to have a nearby mail enabled Linux box, I've written little daemons that look for a client on the SCO side to shoot over whatever it wants to be emailed. That works, but at the cost of yet another client/server connection to maintain.

In other cases, I've written Perl scripts. There are lots of Perl SMTP modules to choose from, so it's not particularly hard to clobber up something.

I've never had the energy to piece together anything that would be general purpose, however. Too lazy and my Perl skills aren't all that strong anyway. I was therefore happy to find this GPL'd Perl sendEmail program.

(Article continues after the break)




I haven't actually had a recent need for this. SCO work is slim pickings today and when any does come along, I usually try to steer them to Linux for what I hope are obvious reasons. However, I did see this SCO newsgroup post where at least two people said they had used this, so I have pretty good confidence that it will work. I don't see any module dependencies that should break it on SCO (maybe if you need TLS), so it should be ready to roll.

If you are inserting this into a transplanted/upgraded system that used to depend upon Sendmail or MMDF, you'll need to figure out how to best deploy it. You could change all your calling scripts or you could hack this so that it would expect the flags and arguments they send, or you can put a "glue" script in between that translates arguments. If you aren't sure just where and when other scripts are doing their things, a "glue" script might make the most sense.

Of course this would also work on Linux and Mac OS X. Running it with "--help" gives the following output:

sendEmail-1.56 by Brandon Zehm <[email protected]>

Synopsis:  sendEmail -f ADDRESS [options]

  Required:
    -f ADDRESS                from (sender) email address
    * At least one recipient required via -t, -cc, or -bcc
    * Message body required via -m, STDIN, or -o message-file=FILE

  Common:
    -t ADDRESS [ADDR ...]     to email address(es)
    -u SUBJECT                message subject
    -m MESSAGE                message body
    -s SERVER[:PORT]          smtp mail relay, default is localhost:25

  Optional:
    -a   FILE [FILE ...]      file attachment(s)
    -cc  ADDRESS [ADDR ...]   cc  email address(es)
    -bcc ADDRESS [ADDR ...]   bcc email address(es)
    -xu  USERNAME             username for SMTP authentication
    -xp  PASSWORD             password for SMTP authentication

  Paranormal:
    -b BINDADDR[:PORT]        local host bind address
    -l LOGFILE                log to the specified file
    -v                        verbosity, use multiple times for greater effect
    -q                        be quiet (i.e. no STDOUT output)
    -o NAME=VALUE             advanced options, for details try: --help misc
        -o message-content-type=<auto|text|html>
        -o message-file=FILE         -o message-format=raw
        -o message-header=HEADER     -o message-charset=CHARSET
        -o reply-to=ADDRESS          -o timeout=SECONDS
        -o username=USERNAME         -o password=PASSWORD
        -o tls=<auto|yes|no>         -o fqdn=FQDN


  Help:
    --help                    the helpful overview you're reading now
    --help addressing         explain addressing and related options
    --help message            explain message body input and related options
    --help networking         explain -s, -b, etc
    --help output             explain logging and other output options
    --help misc               explain -o options, TLS, SMTP auth, and more
 



If this page was useful to you, please help others find it:  





7 comments




More Articles by - Find me on Google+



Click here to add your comments
- no registration needed!




Sun Feb 26 20:27:01 2012: 10655   anonymous

gravatar


What about Mutt

there is skunkware available, simple and works on all platforms

.muttrc is a nice add-on as well



Sun Feb 26 22:28:19 2012: 10656   TonyLawrence

gravatar


You know, I didn't realize that mutt had become SMTP capable. When did that get put in?



Mon Feb 27 21:52:28 2012: 10659   BigDumbDinosaur
http://bcstechnology.net
gravatar


What about Mutt

Mutt is an E-mail client that can replace mailx on many systems, including OSR5. Not sure what that has to do with setting up and outgoing mail service under OSR5.



Mon Feb 27 22:03:02 2012: 10660   TonyLawrence

gravatar


They added SMTP capability to mutt at some point, so it can be used like this Perl code.



Mon Feb 27 23:50:00 2012: 10661   anonymous

gravatar


we do something like this

mutt -a attachment -s subject toemail@address piping that to an email body with a EOF at the end of it

works like a champ and everything gets filtered through sendmail



Tue Feb 28 00:12:18 2012: 10662   TonyLawrence

gravatar


You are misunderstanding. You are using mutt just as a client, an MUA, not as a direct SMTP MTA.

Mutt CAN act as an MTA, but that's not what you are doing there.



Wed May 22 21:30:47 2013: 12079   rblake

gravatar


Thanks Tony. I just installed this script and perl 5.8.7Ba from SCO's FTP site. Works fine, now I can add email notification of our backup status.

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar

Kerio Connect Mailserver

Kerio Samepage

Kerio Control Firewall

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

I am a Kerio reseller. Articles here related to Kerio products reflect my honest opinion, but I do have an obvious interest in selling those products also.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

pavatar.jpg

This post tagged:

       - Linux
       - MacOSX
       - Mail
       - SCO_OSR5















My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide



Buy Kerio from a dealer
who knows tech:
I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals



Click and enter your name and phone number to call me about Kerio® products right now (Flash required)