Hello, > When I send an executable to the printer, I can see from the status file > that it is starting the converter with the correct parameters but I > receive no e-mail. If I cut-n-paste the command and run it by hand, a > mail message is sent, so I know the script is working correctly. As far > as I can tell, the script is not running at all: > > job type 'msg', converter '/tmp/yell_at_user.pl chris > 2003-07-11-16:16:40.000 sonyminf.exe 2>&1' at 16:16:41.608 > converter done, output 0 bytes at 16:16:41.610 >
Looks your routing stderr to stdout with '2>&1', I'd say this is probably a bad thing, especially when trying to debug. - Is this added automagically?? Also, you may want to check that the user the script runs as a user that can send mail (although unlikely a problem). Sudo and 'ALL= NOPASSWD: /bin/sendmail' may be useful for this. Cheers, sam > Here is my script: > > $!/usr/local/bin/perl > > ($user, $time, $job) = @ARGV; > > open(SENDMAIL, "|/usr/lib/sendmail -oi -t") > or die "Can't fork for sendmail: $!\n"; > print SENDMAIL <<"EOF"; > From: Chris O'Regan <[EMAIL PROTECTED]> > To: $user > Subject: Your job could not be printed > > We could not print the following job at $time > > $job > > The printer does not support this file type. > EOF > close(SENDMAIL) or warn "sendmail didn't close nicely"; > > print STDOUT <<"EOF"; > %!PS-Adobe-3.0 > /Courier > findfont 10 scalefont setfont > 72 500 moveto > (User $user attempted to print the following file:) show > 72 480 moveto > ( $job) show > 72 460 moveto > (At $time) show > 72 440 moveto > (File cannot be printed -- unsupported file type) show > showpage > EOF > > exit 0 > > > Any ideas? > > > Thanks, > > Chris > > > > ----------------------------------------------------------------------------- > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > The address you post from MUST be your subscription address > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > or lprng-digest-requests) with the word 'help' in the body. For the impatient, > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] > with: | example: > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > If you have major problems, send email to [EMAIL PROTECTED] with the word > LPRNGLIST in the SUBJECT line. > ----------------------------------------------------------------------------- -- CERN, Geneva IT - Product Support - Unix Infrastructure E-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
