sffsmtp

sffsmtp

Simple program to read a file or a stream of data and send it to an SMTP
server.

    cat infile | sffsmtp -s smtphostname -t toaddress
    sffsmtp -s smtphost -t toaddress -i infile

    sffsmtp -t root -s fp2 -i testfile

Input switches :
Mandatories
    -t : TO: mail name          default: none
        -t abc@fippo.co.uk
    -s : name of host running SMTP      default: this host
Optionals
    -1 : file to send           default: none
    -a : text to send after  the data   default: none
    -A : file to send after  the data   default: none
    -b : text to send before the data   default: none
    -B : file to send before the data   default: none
    -D : display all data sent and received default: none
    -f : From: your reply address       default: fip
    -h : Extra Fip Header information   default: none
        -h "#DU:mailsort#SC:ascii#SN:\$e\$y\$i\$d\$z"
    -l : do NOT log             default: log
    -p : port number (if NOT port 25)   default: 25 for SMTP
    -w : find the logon from the w4 FipId   default: fip
    -W : wrap line              default: 76
        -W0 for no wrap
    -v : version and exit

For those switches with parameters, the parameter MUST be separated by a space.

    sffsmtp -s somehost -p 25 -t "comet@xmas.com 8BITMIME CRUD
STUFF,rudolph@xmas.com" -1 xmas.cards.fip
or with display ...
    sffsmtp -s somehost -p 25 -t "comet@xmas.com 8BITMIME CRUD
STUFF,rudolph@xmas.com" -D -1 xmas.cards.fip

Note that you may want to make the data file a bit prettier that normal by
adding these lines to the file OR -A or -a
From: (from addresses)
To: (to addresses)
Subject: (headline)
(blank line)

Note that if defining escape chrs in scripts, you will probably need to escape
the escapes ! eg : \n becomes \\n

Other env varis can be used to define where the system is :
    SFF_HOME    where the home or top queue is.     default: /fip
            eg  setenv  SFF_HOME    /ripexpress/underware
    SFF_LOG     where the log files queue is        default: (SFF_HOME)/log
    SFF_SPOOL   where the data queues are       default: (SFF_HOME)/spool
    SFF_TMP     where the tmp data queues is        default: (SFF_HOME)/x
            THIS MUST BE ON THE SAME UNIX VOLUME as SFF_SPOOL queues.
            ie if spools are on /data99 which is hard disk /dev/sd0, you MUST also
            have the TMP queue on the same disk/partition

NOTE that for all BUT SFF_HOME, if the parameter starts with a '/' then it is a
hard, absolute path; if not then the spool area is under SFF_HOME.
    eg  setenv  SFF_SPOOL   /data7      will look under /data7 for queues
    while   setenv  SFF_SPOOL   data7       will look under /fip/data7

Version Control
;00e    11may99 chj original version ;e added -t (multiple addresses)

(copyright) 2017 and previous years FingerPost Ltd.