Installazione di Hylafax come fax in spedizione

From RVM Wiki
Revision as of 15:21, 25 January 2006 by Gabriele.vivinetto (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Prerequisti

Installare Hylafax come descritto nei capitoli iniziali di Installazione di Hylafax come fax in ricezione

Attenzione questo articolo è ancora incompleto.
Sentiti libero di contribuire cliccando sul tasto edit.
=======================================
Per invio:



tail /var/log/syslog

Feb  4 18:01:30 allserver FaxQueuer[32141]: HylaFAX (tm) Version 4.2.1
Feb  4 18:01:30 allserver FaxQueuer[32141]: Copyright (c) 1990-1996 Sam Leffler
Feb  4 18:01:30 allserver FaxQueuer[32141]: Copyright (c) 1991-1996 Silicon Graphics, Inc.
Feb  4 18:01:30 allserver HylaFAX[32143]: HylaFAX INET Protocol Server: restarted.
Feb  4 18:01:30 allserver FaxGetty[32148]: OPEN /dev/ttyS0  HylaFAX (tm) Version 4.2.1
Feb  4 18:01:40 allserver FaxGetty[32148]: MODEM PRODOTTO:     LEONARDO Line speed:   33600/
Feb  4 18:02:06 allserver HylaFAX[32156]: Filesystem has SysV-style file creation semantics.


vi /etc/hylafax/hosts.hfaxd:
localhost
127.0.0.1
192.169.22.0/255.255.255.0

altrimenti chiede la password ogni volta

 sendfax -f gabriele@rvmgroup.it -R -r Prova -x Destinatario -d 02-5392491 dead.letter

tail -f /var/log/syslog

Feb  4 18:02:06 allserver FaxQueuer[32141]: SUBMIT JOB 1
Feb  4 18:02:06 allserver FaxGetty[32148]: LOCKWAIT
Feb  4 18:02:17 allserver FaxSend[32175]: MODEM PRODOTTO:     LEONARDO Line speed:   33600/
Feb  4 18:02:17 allserver FaxSend[32175]: SEND FAX: JOB 1 DEST 02-5392491 COMMID 000000001 DEVICE '/dev/ttyS0'
Feb  4 18:02:24 allserver imaplogin: DISCONNECTED, user=dmarcotti, ip=[::ffff:192.169.22.2], headers=0, body=0, time=60
Feb  4 18:02:24 allserver imaplogin: Connection, ip=[::ffff:192.169.22.2]
Feb  4 18:02:24 allserver imaplogin: LOGIN, user=dmarcotti, ip=[::ffff:192.169.22.2], protocol=IMAP
Feb  4 18:02:24 allserver imaplogin: Connection, ip=[::ffff:192.169.22.2]
Feb  4 18:02:24 allserver imaplogin: LOGIN, user=dmarcotti, ip=[::ffff:192.169.22.2], protocol=IMAP
Feb  4 18:02:24 allserver imaplogin: DISCONNECTED, user=dmarcotti, ip=[::ffff:192.169.22.2], headers=0, body=0, time=0
Feb  4 18:02:48 allserver FaxSend[32175]: SEND FAX: JOB 1 SENT in 0:13
Feb  4 18:02:57 allserver FaxSend[32175]: SEND FAX: JOB 1 SENT in 0:08
Feb  4 18:03:00 allserver FaxQueuer[32141]: NOTIFY: bin/notify "doneq/q1" "done" "0:53"
Feb  4 18:03:00 allserver FaxQueuer[32141]: NOTIFY exit status: 0 (32187)
Feb  4 18:03:00 allserver postfix/pickup[31943]: D59113B45C3: uid=10 from=<fax>
Feb  4 18:03:01 allserver postfix/cleanup[32194]: D59113B45C3: message-id=<20050204170300.D59113B45C3@fire.all-logistics.com>
Feb  4 18:03:01 allserver postfix/qmgr[25576]: D59113B45C3: from=<fax@fire.all-logistics.com>, size=969, nrcpt=1 (queue active)


sendfax  -s a4 -n -D -f dpozzi@all-logistics.com -d 025392491 as7.2319.ps

per attivare attach pdf su notifica:


NOOOOOOOOOOOOOOOOOOOOOOOOOOOO
cp notify.awk notify.awk.original

vi /var/spool/hylafax/notify.awk

inserire:

function attachPdf()
{
     MIMEBOUNDARY="NextPart1234567890";
     print "";
     printf "--" MIMEBOUNDARY  "\n";
     print "Content-Type: application/pdf;";
     print "     name=\"Fax.pdf\"";
     print "Content-Transfer-Encoding: base64";
     print "Content-Disposition: attachment;";
     print "     filename=\"Fax.pdf\"";
     print "";
     commandLine = "/usr/bin/ps2pdf " files [0] " - | /usr/local/bin/base64 " " -";
     system (commandLine);
     print "";
     printf "--" MIMEBOUNDARY "--";
     print "";
}

aggiungere la riga alla nella funzione putHeaders tra
 if (status != "") {
            print "  Additional information:\n    " status;
            returnTranscript();
        }
e

    } else if (why == "failed") {
        putHeaders(jobtag " to " number " failed");

attachPdf();



cp notify notify.original
cp notify.awk notify
/NOOOOOOOOOOOOOOOOOOOOOOOOOOOO

vi notify
RETURNFILETYPE="pdf"