Problem
When my printer is configured under SCO AFPS to use a print processor script, and the print request physically prints or is copied to a file, the "root" user on the system receives a mail message in the following format:
To: lp@scotest.test.sco.com
Subject: Failed mail
Date: Mon, 8 Sep 97 20:46:43 BST
Message-ID: <9709082046.aa01712@scotest.test.sco.com>
Status: RTrouble sending mail on scotest.test.sco.com:============ Transcript follows ============(USER) Unknown user name in "administrator" Submit error: No valid addresses
============== Message follows =============
From: lp@scotest.test.sco.com (Printer administrator)
X-Mailer: SCO OpenServer Mail Release 5.0
To: administrator
Subject: Status of lp request.
Date: Mon, 8 Sep 97 20:46:42 BSTSubject: Status of lp request 338245_q-484Your request 338245_q-484 destined for 338245_q was canceled by the administrator.
As an example only, the print processing was set up as follows:
The SCO OpenServer system was running Release 5.0.0d of the operating system together with SCO AFPS version 3.5.2n. A Microsoft Windows for Workgroups PC (Win 3.11) was used as the networked client to initiate the print requests.
A print processor script is set up as documented in the SCO AFPS System Guide.
Create a file called:/usr/net/servers/lanman/customs/338245containing:cp $FILENAME /tmp/myfile$$This copies any print request into a temporary file within the "/tmp" directory.
Change its permissions:chmod +x 338245Create a printer share or class:net share 338245 /printAlter the printer share to use the processor script:
net print 338245_q /processor:338245Run "# net share" to check it exists:
...
...
UKMARKET C:\TMP\UKMARKET
USERS C:\USR Users Directory
338245_Q Spooled
...Log in as the "ADMINISTRATOR" user to the AFPS server domain from the PC client.
Go into the PC Printer Manager and connect "LPT1" or "LPT2" to the share "\\scotest\338245_q".
Start an application such as "Notebook", open a test file such as "c:\autoexec.bat", and print it via LPT1 or whatever the share was set to.
At the same time, on the AFPS server check the output of the "net print" command using a simple loop such as:
#while true
>do
>net print
>doneThe print request should appear in the queue.
Printers at SCOTESTName Job # Size Status
----------------------------------------------------
338245_Q Queue 1 jobs *Printer Active*
administrator 484 0 Spooling
PRINT1 Queue 0 jobs *Printer Active*
REMOTE Queue 0 jobs *Printer Active*
REMOTE2 Queue 0 jobs *Printer Active*As the "root" user, run "mail" at the command line. After a short while, the mail message appears detailing that the print request has been canceled.
For example:# mail
SCO OpenServer Mail Release 5.0 Type ? for help.
"/usr/spool/mail/root": 1 messages 1 new
>N 1 mmdf Mon Sep 8 20:49 25/761 Failed mailThe temporary file, however, will have been created.
The same problem can also be observed if the SCO LAN Manager Client (LMC) utility is used as the client print initiator. (See ta100038, "How do I use SCO OpenServer 5.0 LAN Manager Client (LMC) printing?") It can be set up as follows:
Again create the same processor script file and print queue as in the example above.
Create a file called "/usr/spool/lp/remote" containing:lmc_queue: /usr/spool/lp/bin/rlmclp -D 338245_q -S
scotestChange the UNIX group and owner of the file to "lp" and its permissions to "444".
As "root",# /usr/lib/lpadmin -p lmc_queue -v /dev/null -m
networkAccept and enable this printer queue.Log in to the AFPS server as an LMC client:
# lmc logon SCOTEST administratorPrint a test file:# lp -c -d lmc_queue /etc/hostsAgain, the file is created in the "/tmp" directory followed by the mail notification to the "root" user.
Cause
By default, AFPS sends all print jobs to the UNIX printing subsystem. A print processor script allows a print job to be sent to a file as an alternative. However, the print subsystem or print queue is still used, but it now has an associated print processor script. Any print job that is submitted, is queued to print on the "usual" LP print queue, but is then passed through to be eventually printed via the print processor script. Once printed or processed in whatever fashion by the processor, the original print request in the LP queue is then canceled, leading to the mail message report.
Solution
This problem is fixed in SCO OpenServer Release 5.0.6. There is a new parameter CANCEL_MAIL, which if set to NO (that is, "CANCEL_MAIL=NO") in /etc/default/lpd, will cause the print cancellation mail message to _not_ be sent.
See also
SCO Advanced File and Print Server System Guide, Chapter 4, pages 103, 104.
ta100057, "AFPS print requests are canceled by the administrator but do print (HPNP).".
ta100038, "How do I use SCO OpenServer 5.0 LAN Manager Client (LMC) printing?".