[cups.general] Mail to User if a Printjob is abortet

Daniel Spannbauer ds at marco.de
Wed May 6 04:48:04 PDT 2009



Johannes Meixner schrieb:
> Hello,
> 
> On May 6 11:32 Daniel Spannbauer wrote (shortened):
>> Johannes Meixner schrieb:
>>> On May 6 08:05 Daniel Spannbauer wrote (shortened):
>>>> is cups able to send a Mail to a user when his printjob
>>>> was abortet due to an error?
>>> Have a look at
>>> http://www.cups.org/documentation.php/doc-1.3/ref-subscriptions-conf.html
>>> and
>>> http://www.cups.org/documentation.php/doc-1.3/ref-mailto-conf.html
>>> if you run CUPS 1.3 or see
>>> http://www.cups.org/documentation.php?VERSION=1.2
>>> if you run CUPS 1.2
>>>
>>> To see an example in /etc/cups/subscriptions.conf run
>>> root at host# cupsdisable queue_name
>>> user at host$ echo Hello | lp -d queue_name -m
>>> root at host# cat /etc/cups/subscriptions.conf
>>> root at host# cupsenable queue_name
>>>
>>> If it does not work have a look at /var/log/cups/error_log
>>>
>>>
>>> By the way:
>>> http://www.cups.org/documentation.php/doc-1.3/ref-subscriptions-conf.html
>>> reads:
>>> ----------------------------------------------------------------------
>>> you should normally use the command-line programs (lp(1) and lpr(1))
>>> ... to manage your subscriptions.
>>> ----------------------------------------------------------------------
>>> but "man lp" and
>>> http://www.cups.org/documentation.php/doc-1.3/man-lp.html
>>> do not show anything how to "manage subscriptions"
>>> except the plain "-m" parameter.
>> Hello Johannes,
>>
>> thanks for the answer, seems to be interessting. But this seems only to
>> work if I give the "-m"-Option. And the subsrictions.conf seems to be
>> generated automaticly thru the "-m"-Switch. So, if I make changes in
>> that file.... is cups overwriting it?
> 
> As an example this works for me:
> 
> /etc/cups/mailto.conf
> --------------------------------------------------
> SMTPServer server_name.domain
>>From jsmeix at suse.de
> Subject cupsd notification
> --------------------------------------------------
> 
> /etc/cups/subscriptions.conf
> ------------------------------------------------------
> # Subscription configuration file for CUPS v1.3.9
> # Written by cupsd on 2009-05-06 12:16
> NextSubscriptionId 19
> <Subscription 18>
> Events all
> Owner jsmeix
> Recipient mailto:jsmeix at suse.de
> LeaseDuration 0
> Interval 30
> ExpirationTime 0
> NextEventId 35
> </Subscription>
> ------------------------------------------------------
> 

yes, thats clear. But now there are only mails for a printjob started 
from you, and the mail receives only you.
So I have to do an entry for every of my hundreds of users.
It would be nice if that would work:

<Subscription 18>
Events all
Owner $USER
Recipient mailto:$USER at suse.de
LeaseDuration 0
Interval 30
ExpirationTime 0
NextEventId 35
</Subscription>

where USER ist the USer which printed the Dokument.

Regards

Daniel


-- 
Daniel Spannbauer                         Software Entwicklung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8333 9233-27 Fax -11
Rechbergstr. 4 - 6, D 87727 Babenhausen   Mobil +49 171 4033220
http://www.marco.de/                      Email ds at marco.de
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München





More information about the cups mailing list