The CUPS scheduler (cupsd) uses the /etc/cups/subscriptions.conf file to store the list of active subscriptions. Each directive is listed on a line by itself followed by its value. Comments are introduced using the number sign ("#") character at the beginning of a line.
While the subscriptions configuration file consists of plain text and can be modified using your favorite text editor, you should normally use the command-line programs (lp(1) and lpr(1)) or specific applications via IPP requests to manage your subscriptions.
<Subscription NNN> ... Events job-completed </Subscription>
The Events
directive lists the events, separated
by spaces, that the subscriber is interested in. Table 1 lists
the supported event names.
The Events
directive must appear inside a Subscription
section.
Name | Description |
---|---|
all | All events |
job-completed | Send notification when the job is completed |
job-config-changed | Send notification when the job is changed |
job-created | Send notification when a job is created |
job-progress | Send notification for job progress |
job-state-changed | Send notification when the job-state changes |
job-stopped | Send notification when the job is stopped |
printer-added | Send notification when a printer is added |
printer-changed | Send notification when a printer is changed |
printer-config-changed | Send notification when a printer's configuration is changed |
printer-deleted | Send notification when a printer is deleted |
printer-modified | Send notification when a printer is modified |
printer-state-changed | Send notification when the printer-state changes |
printer-stopped | Send notification when a printer is stopped |
server-audit | Send notification when a bad request, security error, or authentication error occurs |
server-restarted | Send notification when the server is restarted |
server-started | Send notification when the server is initially started |
server-stopped | Send notification when the server is shutdown |
<Subscription NNN> ... ExpirationTime 1012563145 </Subscription>
The ExpirationTime
directive specifies the
expiration time of the subscription as a UNIX time value. It is 0
for subscriptions with no predefined expiration time.
The ExpirationTime
directive must appear inside a
Subscription
section.
<Subscription NNN> ... Interval 30 </Subscription>
The Interval
directive specifies the preferred
time interval for event notifications in seconds.
The Interval
directive must appear inside a Subscription
section.
<Subscription NNN> ... JobId 123 </Subscription>
The JobId
directive specifies the
job-id
for job subscriptions.
The JobId
directive must appear inside a Subscription
section.
<Subscription NNN> ... LeaseDuration </Subscription>
The LeaseDuration
directive specifies the number
of seconds that the subscription is valid. A value of 0 means
that the subscription will last forever or the life of the print
job the subscription is attached to.
The LeaseDuration
directive must appear inside a Subscription
section.
<Subscription NNN> ... NextEventId 999 </Subscription>
The NextEventId
directive specifies the
notify-sequence-number
value for the next
notification event. It starts at 1 and increases for every event
that is delivered for the subscription.
The NextEventId
directive must appear inside a Subscription
section.
NextSubscriptionId 999
The NextSubscriptionId
directive specifies the
next subscription ID to use. It defaults to 1 more than the
highest subscription number seen.
<Subscription NNN> ... Owner username </Subscription>
The Owner
directive specifies the user that owns
this subscription.
The Owner
directive must appear inside a Subscription
section.
<Subscription NNN> ... PrinterName name </Subscription>
The PrinterName
directive specifies the name of
the printer or class that is associated with this
subscription.
The PrinterName
directive must appear inside a Subscription
section.
<Subscription NNN> ... Recipient mailto:foo@domain.com </Subscription>
The Recipient
directive specifies the
notify-recipient-uri
value for push-type
notifications. The URI scheme name determines which notifier
program is used to send the event(s).
The Recipient
directive must appear inside a Subscription
section.
<Subscription NNN> ... </Subscription>
The Subscription
section defines a single
subscription in the system. Each subscription is assigned a
unique (to the server) number starting at 1.
<Subscription NNN> ... UserData mailto:bar<40>domain.com </Subscription>
The UserData
directive specifies the
notify-user-data
value, which is normally the "from"
address used in mailto
notifications. Binary values
are introduced by encoding the bytes as hexadecimal values inside
angle brackets, e.g. "<1234>".
The UserData
directive must appear inside a Subscription
section.