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 enjoy frustration, 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.

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
 


Got something to add? Send me email.





(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Simple smtp mail client for SCO Unix


7 comments



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence







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

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 [email protected] 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.

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

Contact us

privacy policy