15.3. Job Reception

When a print job is received, the lpd server will assign a job number to the new job. Historically these have been in the range of 0 to 999, but the longnumber option allows numbers from 0 to 999,999 to be assigned. The server then checks to see that all of the data files for a job have been transferred correctly.

The fifo flag forces all jobs receieved from a particular host to be processed in First In, First Out (fifo) order. No new jobs will be processed until the incoming job has been released into the spool queue.

If an incoming control file filter is specified, then the incoming job's control file will be passed through the incoming_control_filter filter if it is specified. This allows the modification of the control file.

The majority of control file modifications are simple job file format changes. The translate_incoming_format option provides a simple way to do this. See the translate_format for details.

The accounting_namefixup option was introduced to allow a simple mapping of host and user names to names to be used for accounting purposes. By convention, the R field in the job control file specifies the name to be used for accounting purposes.

    accounting_namefixup=list[,list]*
       where list is:   host(,host*)[=user(,user*)]
The incoming job is checked to see if the originating host is in the list of hosts; the first matching one found is used.

Each host list has the format: host,host... where host has the same format used for the oh and other host name matching options. You can use '!host' to invert matching. For example: host1,127.*,!somehost.

When a host match is found, the name to be used for the user is determined from the user list; if none is specified then no changes are made. Each entry in the user list has the format ${option} or name; the ${option} values are extracted from the control file (capital letters) or printcap/configuration information (lower case letters/names). The first non-empty value list value used. For example, the ${R},${L},${accounting_name},anon will select the control file 'R' option value, then the 'L' option value, then the printcap/config option 'accounting_name' value, and then finally the 'anon' value.

The control file is then passed through the router routing filter. This allows the incoming job to be redirected to one or more print queues. For details about all of the capabilities of the routing filter, see Dynamic Routing.

Finally, the lpd server is requested to start a spooling process that will print the newly arrived job.