How to send email (even with attachments) from a NetWare server's console.

Download SEND.NLM with english and hungarian readme in one package.
Runs on NetWare 3.x, 4.x, 5.x, 6.x.



Usage Example:

    load SEND.NLM to@somewhere.com mailhost.otherwhere.com -dfromhost.here.com -fme@here.com -sExciting_mail -msys:etc\file.txt

Will send a message with the following attributes:
    To user:    to@somewhere.com
Via mail server:mailhost.otherwhere.com
Identifying this server as:fromhost.here.com
Using a from address of:me@here.com
With a subject of:Exciting_mail
Attaching the file:sys:etc\file.txt

Note that for this to work, mailhost.otherwhere.com and the appropriate IP address must appear in SYS:ETC\HOSTS as follows:
    192.168.0.1    mailhost.otherwhere.com



What to use it for? Ideas:

Send message about customer's server's startup to some administrative address.
For example, to a mobile.
Insert a line something like this at the end of the autoexec.ncf (plus add proper smtpsrvr entry to sys:etc/hosts)
    load send customer1@customeradmin.com smtpsrvr -dcustomer1.com -sServer_is_up -ffs1@customer1.com -q


Send regular messages about customer's server health, for example mirror status.
Use cron.nlm and toolbox.nlm
Copy cron.nlm and toolbox.nlm to sys:system, load these at the startup (end of autoexec.ncf is OK), put the following line in sys:etc\crontab
    #start mirrstat.ncf at every day 23:30
    30 23 * * * mirrstat.ncf
  and create a mirrstat.ncf in sys:system with the following content:
    del sys:etc\console.old
    unload conlog
    move sys:etc\console.log sys:etc\console.old
    load conlog
    mirror status
    ?#[we need to wait a bit here, 10 seconds default]
    unload conlog
    del sys:etc\console.mir
    move sys:etc\console.log sys:etc\console.mir
    load send customer1@customeradmin.com smtpserver -dcustomer1.com -smirror_status -ffs1@customer1.com -msys:etc\console.mir -q
    load conlog


A more advanced mirrstat.ncf (with 2 weeks of logrotate)


Instead of mirror status only, you can send full server information by using config.nlm. Links:
    config9.exe - Date/Time: 12-05-2000: http://support.novell.com/cgi-bin/search/searchtid.cgi?/2956502.htm
    ^^^ Runs on NetWare 3.12 and above
    fconfig6.exe - Date/Time: 03-10-2004: http://support.novell.com/cgi-bin/search/searchtid.cgi?/2968408.htm
    ^^^ Newer, but beta and runs on NetWare 4.11 and above
    config.nlm's homepage (Made in Hungary): http://www.npsh.hu/config_en.html


Send automatic backup reports of SBACKUP.
    ### Sbackup activity log mailer - (C)2002, Hunet Kft. - www.hunetkft.hu
### sbcon has to be unloaded, as it can't be unloaded automatically
unload qman
### store old logs for 7 days...
del system\tsa\log\activity.7
mv system\tsa\log\activity.7 system\tsa\log\activity.8
mv system\tsa\log\activity.6 system\tsa\log\activity.7
mv system\tsa\log\activity.5 system\tsa\log\activity.6
mv system\tsa\log\activity.4 system\tsa\log\activity.5
mv system\tsa\log\activity.3 system\tsa\log\activity.4
mv system\tsa\log\activity.2 system\tsa\log\activity.3
mv system\tsa\log\activity.1 system\tsa\log\activity.2
mv system\tsa\log\activity.log system\tsa\log\activity.1
load sendnlm to-me@mydomain.com smtprelay -dcustomersdomain.com -m\system\tsa\log\activity.1 -sSBCON_LOG -fnwserver@customersdomain.com -q
load qman
### visual sample of processed SBACKUP logs


Send automatic backup reports of ARCserve.
    #ARCserve activity log mailer - (C)2002, Hunet Kft. - www.hunetkft.hu
del arcserve.6\arch$svr.7
mv arcserve.6\arch$svr.6 arcserve.6\arch$svr.7
mv arcserve.6\arch$svr.5 arcserve.6\arch$svr.6
mv arcserve.6\arch$svr.4 arcserve.6\arch$svr.5
mv arcserve.6\arch$svr.3 arcserve.6\arch$svr.4
mv arcserve.6\arch$svr.2 arcserve.6\arch$svr.3
mv arcserve.6\arch$svr.1 arcserve.6\arch$svr.2
mv arcserve.6\arch$svr.log arcserve.6\arch$svr.1
load sendnlm to-me@mydomain.com smtprelay -dcustomersdomain.com -m\arcserve.6\arch$svr.1 -sARCserve_LOG -fnwserver@customersdomain.com -q
### visual sample of processed ARCserve logs



Since SEND.NLM needs an accessible SMTP server, and won't queue the message, for more reliable method of sending or occasionally connected servers you might want to have a local SMTP relay server on the NetWare server itself. Check out mercury.nlm



Tool written by:
Comments, suggestions about this web page, to:

SendNLM is also listed on Novell's CoolSolutions at http://www.novell.com/coolsolutions/tools/14317.html


v1.00 - 2004.03.13 First version
v1.01 - 2004.03.31 Minor modifications, advanced mirrstat.ncf
v1.02 - 2004.09.14 SEND.NLM v1.13
v1.03 - 2005.05.03 SEND.NLM v1.14
v1.04 - 2005.09.19 SEND.NLM v1.15 [2005.09.18, -y switch]
v1.05 - 2007.11.03 SEND.NLM v1.16 [2007.10.28, Date field RFC compliance]

BACK