.PL63 .PN1 .....L....T.T.......................................R.L..............A .FO2 =AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA>@@ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ UNOTE 111~ Page # of 2 .HE3 .....L....T.T.......................................R.L..............A .....L....T.T......................................................R.L..............A From‰:‰Customer Services UNOTE 111~ Re‰ :‰Using the Unix "at" command to delay Electronic Mail~ 07 Jul 93~ =AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA>@@ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ .....L.......T.......T.......T.......T.......T.......T.......T.......J QUESTION:~@@ EEEEEEEE How do I configure a system entry in the UAP/umail/umail.rc file using the Unix "at" command, so that mail will be queued for a@@ AA specified time ?~ BACKGROUND:~@@ EEEEEEEEEE The Uniplex Configuration Guide Part 2 pages 11-36, 11-37 illustrates, with an example, how to specify a priority for a time of the day in a #SYSTEM section of the UAP/umail/umail.rc file.~ Unfortunately, the usage of the Unix "at" command is incorrect in@@ AA this example, as reported in PSR 31790 shown below :-~ ........L....T.......T.......T.......T.......T.......T.......T.......J YCG: II Plus Config Guide‰ PSR=31790~@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA The example of COMMAND specified page 11-37 of the Configuration Guide Part 2 will not work. This is firstly because the syntax of the Unix "at" command does not conform to the example given, and in some cases a "bad date specification" error will be returned. Secondly, there is also a problem in the way arguments are passed to the "at" command because the temporary mail file will have been cleared before it is processed by the "at" command. .....L.......T.......T.......T.......T.......T.......T.......T.......J Please note, as this problem has been raised with a PSR number, the documentation will be addressed in a future release of Uniplex.~ The problem in this example is principally due to the COMMAND line not conforming to the syntax of the Unix "at" command.~@@ AA Typically, on Unix System V (AT&T) systems, the syntax for the@@ AAAAAAAAAAAAA AAAAAA "at" command is as follows:-~@@ AA at time [ date ] [ + increment ]~@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Using a command such as "at 6:30pm mail [TO] < [LETTER]" will@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA interpret any arguments specified after the time as being a date and will therefore return a "bad date specification" error.~ On Unix Berkeley type systems, the syntax for the "at" command is@@ AAAAAAAAAAAAA AA as follows:-~ at time [ day ] [ file ]~@@ AAAAAAAAAAAAAAAAAAAAAAAA Where [file] is a file containing the commands to be executed by the "at" command.~@@ AA In this case, using a command such as "at 6:30pm mail [TO] <@@ AAAAAAAAAAAAAAAAAAAAAAA [LETTER]" will interpret any arguments specified after the time@@ AAAAAAAA as being a file name. It will not return any error message, however, it will not take in account the other arguments passed to it.~ .PA SOLUTION:~@@ EEEEEEEE In the #SYSTEM section for your system in UAP/umail/umail.rc, change the COMMAND line to reflect:-~ .FN FX-NORMAL COMMAND = /usr/UAP/cmds/sendit [TO] [LETTER];~@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA .FN NORMAL where for example, /usr is the location of the Uniplex@@ AAAA installation.~ Then place in /usr/UAP/cmds the following script called "sendit", and modify the "at" command in this script accordingly to the@@ AA time/date that is required:-~ Ensure that the time/date syntax that you are using in this script conforms to the time/date syntax for the "at" command on@@ AA your system.~ .........L...T.......T.......T.......T.......T.......T.......T.......J .FN FX-NORMAL .JN #!/bin/sh~ #~ # sendit : performs a Unix "at" sent of the incoming mail~ #~ AT_TO=$1~ AT_LETTER=$2~ AT_TMPFILE=$Utemp/$User.at.$U_pmid #Unique temp file~ > $AT_TMPFILE #Clears temp file~ /bin/echo "mail $AT_TO << ENDOFMAIL" > $AT_TMPFILE~ /bin/cat $AT_LETTER >> $AT_TMPFILE~ /bin/echo "ENDOFMAIL" >> $AT_TMPFILE~ /bin/cat $AT_TMPFILE | at now + 1 minutes~ rm $AT_TMPFILE #Clears temp file~