Package: hylafax-server
Version: 2:4.3.1-3

After upgrading hylafax from 4.3.0-9 to 4.3.1-3 notifications aren't sent properly any longer. I configured hylafax to attach the sent fax to notification-mails as pdf-file . In 4.3.0-9 the configuration worked flawlessly, after the upgrade to 4.3.1-3 the pdf-file is missing in notifications. I gathered some data which might help identifying the cause of the problem. Apparently the notify-shellscript runs into problems when trying to generate the attachment.

Version-Information:
Debian etch
lise:~# uname -a
Linux lise 2.6.18 #1 SMP Sun Dec 10 02:58:20 CET 2006 i686 GNU/Linux

ii adduser 3.100 Add and remove users and groups ii debconf 1.5.8 Debian configuration management system ii debconf-utils 1.5.8 debconf utilities ii gs 8.54.dfsg.1-5 Transitional package ii hylafax-client 4.3.1-3 Flexible client/server fax software - client ii hylafax-doc 4.3.1-3 Flexible client/server fax software - HTML D ii hylafax-server 4.3.1-3 Flexible client/server fax software - server ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries ii libgcc1 4.1.1-19 GCC support library ii libpam0g 0.79-4 Pluggable Authentication Modules library ii libtiff-tools 3.8.2-6 TIFF manipulation and conversion tools ii libtiff4 3.8.2-6 Tag Image File Format (TIFF) library ii lsb-base 3.1-22 Linux Standard Base 3.1 init script function ii mailx 8.1.2-0.20050715cvs-1 A simple mail user agent ii metamail 2.7-52 implementation of MIME ii mgetty 1.1.35-2 Smart Modem getty replacement ii mgetty-viewfax 1.1.35-2 Program for displaying Group-3 Fax files und ii psmisc 22.3-1 Utilities that use the proc filesystem ii sed 4.1.5-1 The GNU sed stream editor ii sharutils 4.2.1-15 shar, unshar, uuencode, uudecode ii ssl-cert 1.0.13 Simple debconf wrapper for openssl ii zlib1g 1.2.3-13 compression library - runtime



hylafax Configuration:

/etc/hylafax/FaxNotify
======================
lise:/var/spool/hylafax# cat /etc/hylafax/FaxNotify
FROMADDR="[EMAIL PROTECTED]"
RETURNFILETYPE=pdf;


Details of the notification-process:

/var/log/syslog excerpt after successfully sending a fax
========================================================
Dec 24 14:02:49 lise FaxSend[23114]: MODEM INTEL CORPORATION MD56xx/
Dec 24 14:02:50 lise FaxSend[23114]: SEND FAX: JOB 17 DEST 01234123456 COMMID 000000018 DEVICE '/dev/ttyS0' FROM 'hf <[EMAIL PROTECTED]>' USER hf
Dec 24 14:03:28 lise FaxSend[23114]: SEND FAX: JOB 17 SENT in 0:11
Dec 24 14:03:31 lise FaxQueuer[23079]: NOTIFY: bin/notify "doneq/q17" "done" "0:54"
Dec 24 14:03:32 lise FaxQueuer[23079]: NOTIFY exit status: 0 (23118)


running notification-script manually
====================================
lise:/var/spool/hylafax# bin/notify "doneq/q17" "done" "0:54"
grep: unrecognized option `-- data'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
FILE 1: docq/doc17.ps
Converting docq/doc17.ps to PDF
Using ps2pdf
basename: extra operand `ESP'
Try `basename --help' for more information.



running notification-script manually (sh -x)
============================================
lise:/var/spool/hylafax# sh -x bin/notify "doneq/q17" "done" "0:54"
+ '[' 3 '!=' 3 ']'
+ test -f etc/setup.cache
+ QFILE=doneq/q17
+ WHY=done
+ JTIME=0:54
+ NEXT='??:??'
+ ENCODING=base64
+ MIMENCODE=mimencode
+ TIFF2PDF=bin/tiff2pdf
+ TTYCMD=tty
+ CHARSET=us-ascii
+ . etc/setup.cache
++ AWK=/usr/bin/awk
++ BASE64ENCODE=/usr/bin/uuencode
++ BIN=/usr/bin
++ CAT=/bin/cat
++ CHARSET=UTF-8
++ CHGRP=/bin/chgrp
++ CHMOD=/bin/chmod
++ CHOWN=/bin/chown
++ CP=/bin/cp
++ DPSRIP=/usr/local/sbin/ps2fax.exe
++ ECHO=/bin/echo
++ ENCODING=base64
++ FAXQ_SERVER=yes
++ FONTPATH=/usr/share/fonts/type1/gsfonts
++ FUSER=/bin/fuser
++ GREP=/bin/grep
++ GSRIP=/usr/bin/gs
++ HFAXD_OLD_PROTOCOL=no
++ HFAXD_SERVER=yes
++ HFAXD_SNPP_SERVER=no
++ IMPRIP=/usr/lib/print/psrip
++ LIBDATA=/etc/hylafax
++ LIBEXEC=/usr/sbin
++ LN=/bin/ln
++ MANDIR=/usr/share/man
++ MIMENCODE=/usr/bin/uuencode
++ MKFIFO=/usr/bin/mkfifo
++ MV=/bin/mv
++ PATHEGETTY=/etc/hylafax/egetty-link
++ PATHGETTY=/etc/hylafax/getty-link
++ PATH=/usr/sbin:/bin:/usr/bin:/etc:/usr/local/bin
++ PATHVGETTY=/etc/hylafax/vgetty-link
++ PSPACKAGE=gs
++ QPENCODE=/usr/bin/qp-encode
++ RM=/bin/rm
++ SBIN=/usr/sbin
++ SCRIPT_SH=/bin/bash
++ SED=/bin/sed
++ SENDMAIL=/usr/sbin/sendmail
++ SPOOL=/var/spool/hylafax
++ SYSVINIT=
++ TARGET=i686-pc-linux-gnu
++ TIFF2PDF=/usr/bin/tiff2pdf
++ TIFFBIN=/usr/bin
++ TTYCMD=/usr/bin/tty
++ UUCP_LOCKDIR=/var/lock
++ UUCP_LOCKTYPE=ascii
++ UUENCODE=/usr/bin/uuencode
+ . bin/common-functions
+ INFO=/usr/sbin/faxinfo
+ TIFFINFO=tiffinfo
+ FAX2PS=/usr/bin/fax2ps
+ TIFF2PS=tiff2ps
+ PS2PDF=ps2pdf
+ PDF2PS=pdf2ps
+ PS2FAX=bin/ps2fax
+ PDF2FAX=bin/pdf2fax
+ TOADDR=FaxMaster
+ FROMADDR=FaxMaster
+ NOTIFY_FAXMASTER=never
+ RETURNFILETYPE=
+ MIMEBOUNDARY=NextPart23336
+ RETURNTECHINFO=yes
+ /usr/bin/tty
++ /usr/bin/tty
+ ERRORSTO=/dev/pts/0
+ SetupPrivateTmp
+ TMPDIR=/tmp/tmp-23336
+ mkdir -m 0700 /tmp/tmp-23336
+ '[' 0 '!=' 0 ']'
+ parseQfile
++ /usr/bin/awk -F: '
   function p(varname,val)
   {
       gsub(/\047/, "\047\\\047\047", val);
       printf "%s=\047%s\047\n",varname,val
       printf "export %s\n",varname
   }
   BEGIN {
       nfiles = 0;
       npins = 0;
       pagewidth = 0;
       pagelength = 0;
       resolution = 0;
       jobtype = "facsimile";
       signalrate = "unknown";
       dataformat = "unknown";
       doneop = "default";
       pagernum = "unknown";
       commid = "";
       csi = "";
       equipment = "";
       station = "";
   }
   /^csi/      { p("csi",$2); }
   /^nsf/      { p("equipment",$3); }
   /^nsf/      { p("station",$5); }
   /^jobid/    { p("jobid",$2); }
   /^groupid/    { p("groupid", $2); }
   /^state/    { p("state", $2+0); }
   /^doneop/    { p("doneop", $2); }
   /^number/    { p("number", $2); }
   /^external/    { p("number", $2); }        # override unprocessed number
   /^receiver/    { p("receiver", $2); }
   /^company/    { p("company", $2); }
   /^sender/    { p("sender", $2); }
   /^mailaddr/    { p("mailaddr", $2); }
   /^owner/    { p("owner", $2); }
/^jobtag/ { jobtag = $0; sub("jobtag:", "", jobtag); p("jobtag", jobtag)}
   /^jobtype/    { p("jobtype", $2); }
# status needs to be used in the shell as faxstatus since status is reserved word
   /^status/    { status = $0; sub("status:", "", status);
             while ($0 ~ /\\$/ && getline > 0) {
                 sub(/\\$/, "\n", status);
                 status = status $0;
             } p("faxstatus", status);
           }
   /^resolution/    { p("resolution", $2); }
   /^npages/    { p("npages", $2); }
   /^totpages/    { p("totpages", $2); }
   /^dirnum/    { p("dirnum", $2); }
   /^commid/    { p("commid", $2); }
   /^ntries/    { p("ntries", $2); }
   /^ndials/    { p("ndials", $2); }
   /^pagewidth/    { p("pagewidth", $2); }
   /^pagelength/    { p("pagelength", $2); }
   /^signalrate/    { p("signalrate", $2); }
   /^dataformat/    { p("dataformat", $2); }
   /^modem/    { p("modem", $2); }
   /^totdials/    { p("totdials", $2); }
   /^tottries/    { p("tottries", $2); }
   /^client/    { p("client", $2); }
/^[!]*post/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "PostScript"); } /^[!]*tiff/ { p("files_"++nfiles, $4); p("filetype_"nfiles, "TIFF"); }
   /^[!]*pdf/    { p("files_"++nfiles, $4); p("filetype_"nfiles, "PDF"); }
   /^[!]*pcl/    { p("files_"++nfiles, $4); p("filetype_"nfiles, "PCL"); }
   /^page:/    { p("pins_"++npins, $4); }
   /^data:/    { p("files_"++nfiles, $4); }
   /^poll/        { p("poll", " -p"); }
   END { p("nfiles", nfiles); p("npins", npins) } ' doneq/q17
+ AWK_OUTPUT='state='\''7'\''
export state
npages='\''1'\''
export npages
totpages='\''1'\''
export totpages
ntries='\''0'\''
export ntries
ndials='\''0'\''
export ndials
totdials='\''1'\''
export totdials
tottries='\''1'\''
export tottries
pagewidth='\''209'\''
export pagewidth
resolution='\''196'\''
export resolution
pagelength='\''296'\''
export pagelength
number='\''01234123456'\''
export number
number='\''01234123456'\''
export number
mailaddr='\''[EMAIL PROTECTED]'\''
export mailaddr
sender='\''hf'\''
export sender
jobid='\''17'\''
export jobid
jobtag='\'''\''
export jobtag
modem='\''ttyS0'\''
export modem
receiver='\'''\''
export receiver
company='\'''\''
export company
client='\''lise.local'\''
export client
owner='\''hf'\''
export owner
groupid='\''17'\''
export groupid
signalrate='\''14400 bit/s'\''
export signalrate
dataformat='\''2-D MMR'\''
export dataformat
jobtype='\''facsimile'\''
export jobtype
doneop='\''default'\''
export doneop
commid='\''000000018'\''
export commid
csi='\''Arcor PIA'\''
export csi
equipment='\''unknown '\''
export equipment
station='\'''\''
export station
faxstatus='\'''\''
export faxstatus
files_1='\''docq/doc17.ps'\''
export files_1
filetype_1='\''PostScript'\''
export filetype_1
nfiles='\''1'\''
export nfiles
npins='\''0'\''
export npins'
+ eval 'state='\''7'\''
export state
npages='\''1'\''
export npages
totpages='\''1'\''
export totpages
ntries='\''0'\''
export ntries
ndials='\''0'\''
export ndials
totdials='\''1'\''
export totdials
tottries='\''1'\''
export tottries
pagewidth='\''209'\''
export pagewidth
resolution='\''196'\''
export resolution
pagelength='\''296'\''
export pagelength
number='\''01234123456'\''
export number
number='\''01234123456'\''
export number
mailaddr='\''[EMAIL PROTECTED]'\''
export mailaddr
sender='\''hf'\''
export sender
jobid='\''17'\''
export jobid
jobtag='\'''\''
export jobtag
modem='\''ttyS0'\''
export modem
receiver='\'''\''
export receiver
company='\'''\''
export company
client='\''lise.local'\''
export client
owner='\''hf'\''
export owner
groupid='\''17'\''
export groupid
signalrate='\''14400 bit/s'\''
export signalrate
dataformat='\''2-D MMR'\''
export dataformat
jobtype='\''facsimile'\''
export jobtype
doneop='\''default'\''
export doneop
commid='\''000000018'\''
export commid
csi='\''Arcor PIA'\''
export csi
equipment='\''unknown '\''
export equipment
station='\'''\''
export station
faxstatus='\'''\''
export faxstatus
files_1='\''docq/doc17.ps'\''
export files_1
filetype_1='\''PostScript'\''
export filetype_1
nfiles='\''1'\''
export nfiles
npins='\''0'\''
export npins'
++ state=7
++ export state
++ npages=1
++ export npages
++ totpages=1
++ export totpages
++ ntries=0
++ export ntries
++ ndials=0
++ export ndials
++ totdials=1
++ export totdials
++ tottries=1
++ export tottries
++ pagewidth=209
++ export pagewidth
++ resolution=196
++ export resolution
++ pagelength=296
++ export pagelength
++ number=01234123456
++ export number
++ number=01234123456
++ export number
++ [EMAIL PROTECTED]
++ export mailaddr
++ sender=hf
++ export sender
++ jobid=17
++ export jobid
++ jobtag=
++ export jobtag
++ modem=ttyS0
++ export modem
++ receiver=
++ export receiver
++ company=
++ export company
++ client=lise.local
++ export client
++ owner=hf
++ export owner
++ groupid=17
++ export groupid
++ signalrate='14400 bit/s'
++ export signalrate
++ dataformat='2-D MMR'
++ export dataformat
++ jobtype=facsimile
++ export jobtype
++ doneop=default
++ export doneop
++ commid=000000018
++ export commid
++ csi='Arcor PIA'
++ export csi
++ equipment='unknown '
++ export equipment
++ station=
++ export station
++ faxstatus=
++ export faxstatus
++ files_1=docq/doc17.ps
++ export files_1
++ filetype_1=PostScript
++ export filetype_1
++ nfiles=1
++ export nfiles
++ npins=0
++ export npins
+ '[' -f log/c000000018 ']'
++ cat log/c000000018
++ grep -v '-- data'
grep: unrecognized option `-- data'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
+ SESSION_LOG=
+ '[' default = default ']'
+ doneop=remove
+ '[' facsimile = pager ']'
+ DESTINATION=
+ '[' -n '' ']'
+ DESTINATION=01234123456
+ [EMAIL PROTECTED]
+ export SENDTO FROMADDR TOADDR SESSION_LOG DESTINATION JTIME
+ '[' -f etc/FaxNotify ']'
+ . etc/FaxNotify
++ [EMAIL PROTECTED]
++ RETURNFILETYPE=pdf
+ '[' -n pdf ']'
++ BuildAttachArgs pdf
++ case $1 in
++ a_type=application/PDF
++ a_desc='FAX Document (PDF)'
+++ LocalSequence 1 1
+++ '[' 1 -gt 1 ']'
+++ COUNT=1
+++ '[' 1 -le 1 ']'
+++ echo 1
++++ expr 1 + 1
+++ COUNT=2
+++ '[' 2 -le 1 ']'
++ for i in '`LocalSequence 1 $nfiles`'
++ eval 'filename=$files_1'
+++ filename=docq/doc17.ps
++ TraceLog 'FILE 1: docq/doc17.ps'
++ echo FILE 1: docq/doc17.ps
FILE 1: docq/doc17.ps
++ '[' -f docq/doc17.ps ']'
++ eval 'filetype=$filetype_1'
+++ filetype=PostScript
++ '[' pdf = raw ']'
+++ ConvertFile docq/doc17.ps PostScript pdf
+++ case "$3" in
+++ TraceLog 'Converting docq/doc17.ps to PDF'
+++ echo Converting docq/doc17.ps to PDF
Converting docq/doc17.ps to PDF
+++ case $2 in
+++ TraceLog 'Using ps2pdf'
+++ echo Using ps2pdf
Using ps2pdf
++++ basename docq/doc17.ps .ps
+++ name=doc17
+++ ps2pdf docq/doc17.ps /tmp/tmp-23336/doc17.pdf
+++ echo /tmp/tmp-23336/doc17.pdf
++ a_file='%%[ ProductName: ESP Ghostscript ]%%
%%[Page: 1]%%
%%[LastPage]%%
/tmp/tmp-23336/doc17.pdf'
+++ basename '%%[' ProductName: ESP Ghostscript ']%%' '%%[Page:' '1]%%' '%%[LastPage]%%' /tmp/tmp-23336/doc17.pdf
basename: extra operand `ESP'
Try `basename --help' for more information.
++ a_name=
++ '[' -f '%%[ ProductName: ESP Ghostscript ]%%
%%[Page: 1]%%
%%[LastPage]%%
/tmp/tmp-23336/doc17.pdf' ']'
++ printf %s ''
+ ATTACH_ARGS=
+ template=etc/templates//notify-done.txt
+ '[' facsimile '!=' facsimile ']'
+ eval CreateMailMessage etc/templates//notify-done.txt
++ CreateMailMessage etc/templates//notify-done.txt
+ /usr/sbin/sendmail [EMAIL PROTECTED] -oi [EMAIL PROTECTED]
++ /bin/sed -n -e '/^$/q;p' etc/templates//notify-done.txt
++ /bin/grep -v '^Content'
++ template
++ cat -
++ /usr/bin/awk '
       function include_file (file)
       {
               while (getline bla<file )
               {
                       template_line(bla);
               }

       }
       function template_line (line,   tmp,var)
       {
               while (match(line, /[$][A-Za-z0-9_]+/))
               {
                       if (substr(line,RSTART-1,1) == "\\")
                       {
                               tmp = substr(line, 1, RSTART-2);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s$%s", tmp, var
                       } else
                       {
                               tmp = substr(line, 1, RSTART-1);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s%s", tmp, ENVIRON[var];
                       }
                       line = substr(line,RSTART+RLENGTH)
               }
               if (match(line, /^[#]INCLUDE /))
               {
                       include_file(substr(line,10));
                       return
               }
               print line;
       }

       {
               template_line($0);
       }'
++ echo 'Mime-Version: 1.0'
++ '[' -n '' ']'
++ /bin/sed -n -e '/^$/q;p' etc/templates//notify-done.txt
++ /bin/grep '^Content'
++ template
++ cat -
++ /usr/bin/awk '
       function include_file (file)
       {
               while (getline bla<file )
               {
                       template_line(bla);
               }

       }
       function template_line (line,   tmp,var)
       {
               while (match(line, /[$][A-Za-z0-9_]+/))
               {
                       if (substr(line,RSTART-1,1) == "\\")
                       {
                               tmp = substr(line, 1, RSTART-2);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s$%s", tmp, var
                       } else
                       {
                               tmp = substr(line, 1, RSTART-1);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s%s", tmp, ENVIRON[var];
                       }
                       line = substr(line,RSTART+RLENGTH)
               }
               if (match(line, /^[#]INCLUDE /))
               {
                       include_file(substr(line,10));
                       return
               }
               print line;
       }

       {
               template_line($0);
       }'
++ echo ''
+++ /bin/sed -n -e '/^$/q;p' etc/templates//notify-done.txt
+++ /bin/grep -i '^Content-Transfer-Encoding'
+++ /bin/sed -e 's/^[^ ]*: *//'
+++ template
+++ cat -
+++ /usr/bin/awk '
       function include_file (file)
       {
               while (getline bla<file )
               {
                       template_line(bla);
               }

       }
       function template_line (line,   tmp,var)
       {
               while (match(line, /[$][A-Za-z0-9_]+/))
               {
                       if (substr(line,RSTART-1,1) == "\\")
                       {
                               tmp = substr(line, 1, RSTART-2);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s$%s", tmp, var
                       } else
                       {
                               tmp = substr(line, 1, RSTART-1);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s%s", tmp, ENVIRON[var];
                       }
                       line = substr(line,RSTART+RLENGTH)
               }
               if (match(line, /^[#]INCLUDE /))
               {
                       include_file(substr(line,10));
                       return
               }
               print line;
       }

       {
               template_line($0);
       }'
++ body_encoding=Quoted-Printable
++ test Quoted-Printable
++ /bin/sed -n -e '1,/^$/d;p' etc/templates//notify-done.txt
++ template
++ cat -
++ /usr/bin/awk '
       function include_file (file)
       {
               while (getline bla<file )
               {
                       template_line(bla);
               }

       }
       function template_line (line,   tmp,var)
       {
               while (match(line, /[$][A-Za-z0-9_]+/))
               {
                       if (substr(line,RSTART-1,1) == "\\")
                       {
                               tmp = substr(line, 1, RSTART-2);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s$%s", tmp, var
                       } else
                       {
                               tmp = substr(line, 1, RSTART-1);
                               var = substr(line, RSTART+1, RLENGTH-1);
                               printf "%s%s", tmp, ENVIRON[var];
                       }
                       line = substr(line,RSTART+RLENGTH)
               }
               if (match(line, /^[#]INCLUDE /))
               {
                       include_file(substr(line,10));
                       return
               }
               print line;
       }

       {
               template_line($0);
       }'
++ mimeEncode /tmp/tmp-23336/body.txt Quoted-Printable
++ '[' '!' -f /tmp/tmp-23336/body.txt ']'
++ '[' -n Quoted-Printable ']'
++ encoding=Quoted-Printable
+++ echo Quoted-Printable
+++ /bin/sed -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
++ encoding=quoted-printable
++ case "$encoding" in
++ '[' -n /usr/bin/qp-encode ']'
+++ /bin/sed -e 's/^ *//' -e 's/ .*$//'
+++ echo /usr/bin/qp-encode
++ cmd=/usr/bin/qp-encode
++ '[' -x /usr/bin/qp-encode ']'
++ /usr/bin/qp-encode
++ '[' -n '' ']'
+ CleanupPrivateTmp
+ '[' -d /tmp/tmp-23336 ']'
+ case "$TMPDIR" in
+ rm -Rf /tmp/tmp-23336
lise:/var/spool/hylafax#



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to