{"id":3416,"date":"2014-10-25T00:35:52","date_gmt":"2014-10-25T00:35:52","guid":{"rendered":"http:\/\/www.fingerpost.co.uk\/wp\/programme-documentation\/sffmail\/"},"modified":"2014-10-25T00:35:52","modified_gmt":"2014-10-25T00:35:52","slug":"sffmail","status":"publish","type":"page","link":"https:\/\/www.fingerpost.co.uk\/wp\/programme-documentation\/sffmail\/","title":{"rendered":"sffmail  (Sat Oct 25 2014 01:31:01)"},"content":{"rendered":"<pre>\nsffmail\t\t\t\t- to read from stdin\n\tsffmail -o queuename\n\tsffmail -h FipHdr information\n\nSimple program to read in stream of data and stuff it on disk.\n\nIt is used in two main areas - capturing email inbound and capturing file sent\nvia the W4 module.\n\nWhen used for receiving mail sent from an email server - usually kicked off by\n'sendmail' - then an entry in '\/etc\/aliases' is required for EACH logon tracked\n:\n\n\nfip: &quot;| \/fip\/bin\/sffmail -o mail_store -h RZ:fip&quot;\n\nIt is a good idea to add a FipHdr field - like RZ in the above example -\ncontaining the actual logon as mail from ListServers etc do not usually have a\nsingle address.\n\nFor most recent versions of sendmail, you will need to reload aliases once you\nhave modified it using something like :\n\t\/usr\/lib\/sendmail -bi\nor\t\/usr\/sbin\/newaliases\n\nand on rs6000\trefresh -s sendmail\n\nPlease check your particular system what is required.\n\nWe can also 'sffmail' for receiving files from the browser using W4 using the\n'-w' switch.\n\nInput switches :\n\t-e : do NOT add all environment variables as FipHdr fields\tdefault: yes\n\t-E : add all environment variables as FipHdr fields\tdefault: yes\n\t\t*note this option was changed in version 01s to ALWAYS put out the envs\n\t-o : output file path and queue\t\t\tdefault: spool\/xsmtp\n\t-h : Fip Header information\t\t\tdefault: none\n\t\t-h &quot;#DU:mailsort#SC:ascii#SN:$e$y$i$d$z&quot;\n\t-w : use with w4 incoming files\t\t\tdefault: no\n\t-l : log incoming to fip LOG\t\t\tdefault: no\n\t-m : For w4, message to send back if no message file\n\tdefault:&lt;HTML&gt;&lt;Head&gt;&lt;\/HEAD&gt;&lt;BODY&gt;Thank you for \\SV from \\SA - reference\n\\SN&lt;\/BODY&gt;&lt;\/HTML&gt;\n\t-M : For w4 name of a file of FipSeq to send back\n\t\tdefault: \/fip\/web\/template\/recvfile.answer\n\t\tNote old versions (pre 01f) used a default of\n\t\t\t\/fip\/web\/setup\/w4.incoming.answer\n\t\trecvfile.answer uses a stylesheet \/fip\/web\/pages\/css\/recvfilex.css\n\t-r : For w4 multiple files\t- filename of the TOP\n\t-R : For w4 multiple files\t- filename of the TAIL\n\t-d : folder into which we can put the raw files. default: none\n\t\tuse this for debugging\n\t-u : default DU if none specified (mainly for W4 traffic). def:\nw4remoteUnverified\n\t-z : name of parameter file in tables\/mail\tdefault: CHECK.MIME\n\t-v : version and exit\n\nFor those switches with parameters, the parameter MUST be separated by a space.\n\nFipHdr fields filled in are :\nFor W4 -\n\tSP - REMOTE_ADDR of the sendert\n\tSN - Name given by sender\n\tST - Content-type\n\tSW - Full Path of file sent on sender's box\n\tSV - filename on sender's box\n\tSA - Logon\n\tS1 - Publication of that Logon (if there is one)\n\tS2 - Section of that Logon (if there is one)\n\tS3 - UserType of that Logon (if there is one)\n\tS4 - HTTP Host - proxy server\n\tS5 - IPaddress of the sender\n\tS6 - Receiving system hostname\n\tS7 - Receiving system Protocol\n\tPLUS a multitude of date and time fields (the 'HX's)\n\tPLUS any field with a name=&quot;FIP-XX&quot; in the template is added to the FipHdr\n\tPLUS any mime headers in 'xxx-fip-SU: (spc) (data)' format\n\n\tIf there is no DU for ipwheel to match, a default is used -\n&quot;w4remoteUnverified&quot; (from version 01p)\neg\n\t&lt;input type=&quot;hidden&quot; name=&quot;FIP-DU&quot; value=&quot;remote2cci&quot;&gt;\n\t&lt;input type=&quot;hidden&quot; name=&quot;FIP-SU&quot; value=&quot;w4remote&quot;&gt;\n\t&lt;input type=&quot;radio&quot; name=&quot;FIP-WB&quot; value=&quot;holding&quot; checked&gt;\n\t&lt;input type=&quot;input&quot; name=&quot;FIP-WK&quot; value=&quot;&quot; size=15&gt;\n\t&lt;input type=&quot;input&quot; name=&quot;FIP-WN&quot; value=&quot;&quot; size=30&gt;\n\t&lt;input type=&quot;input&quot; name=&quot;FIP-WI&quot; value=&quot;&quot; size=5&gt;\n\nNote there is also an (optional) parameter file with a list of mime-types to\nallow or disallow. The parameter file is in tables\/mail\/CHECK.MIME unless\nspecified otherwise using the '-z' input switch.\n\nThe syntax for the parameters are in the normal Fip standard and the keywords\nare :\n\t; comment\n\t\tdefault-allow-mime-types: yes\/no\/allow\/disallow\n\t\tMake the default to either allow all (except those specifically disallowed)\nor vice versa\n\t\tdefault is yes - ie allow everything in.\n\t\tyes or allow are the same\n\t\tno or disallow are the same\n\t\tallow-empty-mime-type: yes\/no\/allow\/disallow\n\t\tdefault is yes to allow all files with NO mimetype specified to be received.\n\t\tyes or allow are the same\n\t\tno or disallow are the same\n\n\t\tallow-mime-type\n\t\tdisallow-mime-type\n\t\tSpecify the mimetype you want to accept or reject\n\t\tThere can be up to 100 allow\/disallow-mime-types\n\t\teg\tallow-mime-type:text\/plain\n\t\tThere are no defaults\n\t\tNote only the string entered is checked, so :\n\t\t\tallow-mime-type:text\n\t\twill allow ANY text variant - text\/plain, text\/html, texturally\/wonderful.\n\nNormally, if you want to control the types of files received, then :\neither\t1. make the default ALLOW and list the types to DISALLOW\n\t\tdefault-allow-mime-type:yes\n\t\tdisallow-mime-type:application\/msword\n\t\tdisallow-mime-type:binary\nor\t2. make the default DISALLOW and list the types to ALLOW\n\t\tdefault-allow-mime-type:no\n\t\tallow-mime-type:text\/plain\n\t\tallow-mime-type:text\/rtf\n\t\tallow-mime-type:x-fip-quark\n\nExample :\n; DISallow all by default and explictly allow a couple\ndefault-allow-mime-types:no\n\n; nothing there - reject it !\nallow-empty-mime-types:no\n\n; list of those we want\nallow-mime-type:text\nallow-mime-type:image\/jpeg\nallow-mime-type:application\/rtf\nallow-mime-type:application\/x-macbinary\nallow-mime-type:application\/mac-binhex40\nallow-mime-type:application\/octet-stream\nallow-mime-type:application\/zip\nallow-mime-type:application\/x-msexcel\n\n\nThe following parameters may also be specified and are the equivalent for the\nsame inputs in the data stream.\n\t\textra-fiphdr:\tAdd these extra FipHdr fields to each inbound file\n\t\tw4-default-dest:\t(Fip DU or destination in sys\/USERS)\n\t\tSend all files from senders who have NOT logged on to this destination.\n\t\tdefault is 'w4remoteUnverified'\n\n\t\tfilebefore\n\t\tfileafter\n\n\t\tThe following 'w4-message*' parameters allow replacement of the standard\nmessages returned to the client.\n\t\tw4-message-file\n\t\tw4-message\n\t\tw4-message-top\n\t\tw4-message-tail\n\t\tw4-message-nothing\n\t\tw4-message-no-files\n\t \tw4-message-invalid-mimetype\n\t\t\tdefault is ST:&lt;font color=red&gt;** File ignored - MimeType disallowed - \\ST,\nplease resend in acceptable format&lt;\/font&gt;\n\t\tw4-log-accepted: (FipSeq)\n\t\t\tFip Item log line for files accepted and forwarded on to other parts of Fip\n\t\t\tdefault is no string\n\t\tw4-log-rejected: (FipSeq)\n\t\t\tFip Item log line for rejected files\n\t\t\tdefault is &quot;** File ignored from \\SU - MimeType disallowed - \\ST&quot;\n\n\t\trawque: (FipSeq)\n\t\t\tLeave a copy of the incoming file in this folder\n\t\t\teg\trawque:\/fip\/data\/raw.data\/$e$y$i$d_sffmail\n\t\t\tdefault: none\n\nNote that if defining Unix escape chrs in scripts, you will probably need to\nescape the escapes ! eg : n becomes \\n\n\nOther env varis can be used to define where the system is :\n\tSFFMAIL_Z\tname of a parameter file\n\t\t\tThis is overridden by the '-z' input switch.\n\tSFF_HOME\twhere the home or top queue is.\t\tdefault: \/fip\n\t\t\teg\tsetenv\tSFF_HOME\t\/ripexpress\/underware\n\tSFF_LOG\t\twhere the log files queue is\t\tdefault: (SFF_HOME)\/log\n\tSFF_SPOOL\twhere the data queues are\t\tdefault: (SFF_HOME)\/spool\n\tSFF_TMP\t\twhere the tmp data queues is\t\tdefault: (SFF_HOME)\/x\n\t\t\tTHIS MUST BE ON THE SAME UNIX VOLUME as SFF_SPOOL queues.\n\t\t\tie if spools are on \/data99 which is hard disk \/dev\/sd0, you MUST also\n\t\t\thave the TMP queue on the same disk\/partition\n\nNOTE that for all BUT SFF_HOME, if the parameter starts with a '\/' then it is a\nhard, absolute path; if not then the spool area is under SFF_HOME.\n\teg\tsetenv\tSFF_SPOOL\t\/data7\t\twill look under \/data7 for queues\n\twhile\tsetenv\tSFF_SPOOL\tdata7\t\twill look under \/fip\/data7\n\n\nVersion Control\n;002h6\t05sep04\tadded zippy and sum: and bugette in copying data..\n\t;c 17oct06 allow alphanumeric Fipids\n\t;d-h 11mar07 added FIP-MULTI-FILE ;h1 21dec10 64bit issue ;h2 6dec13 bugette -\nextra data before start of blob ;3 HR\n;001z\t27mar99 chj added w4 bits\n\t;a 29may99 mods to Fiplogon\n\t;b 21oct99 added H* fields\n\t;c 01jan00 envs added\n\t;d 01may00 log added\n\t;e 17jan01 added -m\/-M\/-d\n\t;f 20feb01 response template is now in \/fip\/web\/templates\n\t;g\/h 21feb01 Allow big textarea called FIP-DATA as data\n\t;j 25jul01 bugette - w4 new file overwrote SW (fullpathname)\n\t\t\tnot XX (short-just filename)\n\t;k 20sep01 RADIUS_* -&gt; use RealName.\n\t;l\/m 24jan02 cleaned up multiple files for w4\n\t;n\/o 07feb02 added -r\/-R\n\t;p 09aug02 added default DU for w4 if none specified and -u\n\t;r 20aug02 seqno increments for every file now - not JUST for multiples\n\t;s 04sep02 allow mime headers -&gt; FipHdrs if in xxx-fip-SU: format\n\t;t 13dec02 added tracking of mime-types with accept\/rejects (param file)\n\t;u 04jun03 added extra logon info for w4\n\t;v 21jul03 zapped trailing CR on some binary files\n\t;w 24jul03 chg of param file\n\t;y 17nov03 small adjustments incase the Fip-Data field is &gt; 128k\n\t;z 22jan04 bug tracking...\n\n(copyright) 2014 and previous years FingerPost Ltd.\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>sffmail &#8211; to read from stdin sffmail -o queuename sffmail -h FipHdr information Simple program to read in stream of data and stuff it on disk. It is used in two main areas &#8211; capturing email inbound and capturing file sent via the W4 module. When used for receiving mail sent from an email server [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":495,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"page-templates\/full-width.php","meta":[],"_links":{"self":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/3416"}],"collection":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/comments?post=3416"}],"version-history":[{"count":0,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/3416\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/pages\/495"}],"wp:attachment":[{"href":"https:\/\/www.fingerpost.co.uk\/wp\/wp-json\/wp\/v2\/media?parent=3416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}