Lieber Besucher, herzlich willkommen bei: Linux Forum Linux-Web.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Zitat
Original von pycak
warum ist das nicht gut???
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »linuxerr« (07.05.2007, 15:37)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
#! /bin/sh # $Id: faxrcvd.sh.in,v 1.42 2006/12/04 21:03:51 aidan Exp $ # # HylaFAX Facsimile Software # # Copyright (c) 1990-1996 Sam Leffler # Copyright (c) 1991-1996 Silicon Graphics, Inc. # HylaFAX is a trademark of Silicon Graphics # # Permission to use, copy, modify, distribute, and sell this software and # its documentation for any purpose is hereby granted without fee, provided # that (i) the above copyright notices and this permission notice appear in # all copies of the software and related documentation, and (ii) the names of # Sam Leffler and Silicon Graphics may not be used in any advertising or # publicity relating to the software without the specific, prior written # permission of Sam Leffler and Silicon Graphics. # # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. # # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # # # faxrcvd file devID commID error-msg # if [ $# -lt 4 ]; then echo "Usage: $0 file devID commID error-msg [ callID-1 [ callID-2 [ ... [ callID-n ] ] ] ]" exit 1 fi test -f etc/setup.cache || { SPOOL=`pwd` cat<<EOF FATAL ERROR: $SPOOL/etc/setup.cache is missing! The file $SPOOL/etc/setup.cache is not present. This probably means the machine has not been setup using the faxsetup(8) command. Read the documentation on setting up HylaFAX before you startup a server system. EOF exit 1 } # These settings may not be present in setup.cache if user upgraded and # didn't re-run faxsetup; we set them before calling setup.cache for # backward compatibility. ENCODING=base64 MIMENCODE=mimencode TIFF2PDF=bin/tiff2pdf TTYCMD=tty CHARSET=us-ascii . etc/setup.cache . bin/common-functions INFO=$SBIN/faxinfo FAX2PS=$TIFFBIN/fax2ps TIFF2PS=tiff2ps TOADDR=FaxMaster FROMADDR=FaxMaster TIFFINFO=tiffinfo NOTIFY_FAXMASTER=always # # Redirect errors to a tty, if possible, rather than # dev-nulling them or allowing them to creep into # the mail. # if $TTYCMD >/dev/null 2>&1; then ERRORSTO=`$TTYCMD` else ERRORSTO=/dev/null fi # # Permit various types of attachment types: ps, tif, pdf # Note that non-ASCII filetypes require an encoder. # pdf requires tiff2ps and tiff2pdf # FILETYPE=ps SENDTO= |
Quellcode |
|
1 |
ARCHIVDIR=/home/hylafax |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# # There is no good portable way to find out the fully qualified # domain name (FQDN) of the host or the TCP port for the hylafax # service so we fudge here. Folks may want to tailor this to # their needs; e.g. add a domain or use localhost so the loopback # interface is used. # HOSTNAME=`hostname` # XXX no good way to find FQDN PORT=4559 # XXX no good way to lookup service FILE="$1"; shift; DEVICE="$1"; shift; COMMID="$1"; shift; MSG="$1"; shift; COUNT=1 while [ $# -ge 1 ]; do # The eval has $1 set yet, and this forces a variable-to-variable # assignment, allowing us to not need to do escaping eval CALLID$COUNT='$1' export CALLID$COUNT shift COUNT=`expr $COUNT + 1` done CIDNUMBER="$CALLID1" CIDNAME="$CALLID2" DESTINATION="$CALLID3" FILENAME=`echo $FILE | $SED -e 's/\.tif//' -e 's/recvq\///'` SetupPrivateTmp parseFaxInfo $FILE MIMEBOUNDARY="NextPart$$" if [ -n "$MSG" ]; then SESSION_LOG=`cat log/c$COMMID` export SESSION_LOG fi export FILE export COMMID export DEVICE export MSG export FROMADDR export HOSTNAME export PORT export SENDTO export TOADDR # # Apply customizations. All customizable variables should # be set to their non-customized defaults prior to this. # if [ -f etc/FaxDispatch ]; then . etc/FaxDispatch # NB: FaxDispatch sets SENDTO fi ## MailWithFAX <type> ## Email the <type> template,adding the attachments according ## to $FILETYPE to $SENDTO ## ## We use the common CreateMailMessage <template> <f1> <t1> <n1> <d1> ## function, creating the file to mail as we go. MailWithFAX () { template="etc/templates/$TEMPLATE/faxrcvd-$1.txt" if [ "$FILETYPE" = "tif" ]; then CreateMailMessage $template \ $FILE image/tiff "$FILENAME.tif" "FAX Document" \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$SENDTO" elif [ $FILETYPE = "pdf" ]; then $TIFF2PDF -o tmp/$FILENAME.pdf $FILE 2>$ERRORSTO CreateMailMessage $template \ tmp/$FILENAME.pdf application/pdf "$FILENAME.pdf" "FAX Document" \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$SENDTO" |
Quellcode |
|
1 |
cp tmp/${FILENAME}.pdf ${ARCHIVDIR}/${FILENAME}.pdf |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
rm -f tmp/$FILENAME.pdf else $FAX2PS $FILE > tmp/$FILENAME.ps 2>$ERRORSTO CreateMailMessage $template \ tmp/$FILENAME.ps application/postscript "$FILENAME.ps" "FAX Document" \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$SENDTO" rm -f tmp/$FILENAME.ps fi } if [ -f $FILE ]; then # # Don't send FaxMaster duplicates, and FaxMaster may not even # want a message at all, depending on NOTIFY_FAXMASTER. # case $NOTIFY_FAXMASTER$MSG in never*) NOTIFY_FAXMASTER=no;; errors) NOTIFY_FAXMASTER=no;; *) NOTIFY_FAXMASTER=yes;; esac if [ "$TOADDR" != "$SENDTO" ] && [ "$NOTIFY_FAXMASTER" != "no" ]; then if [ -z "$MSG" ]; then CreateMailMessage etc/templates/$TEMPLATE/faxrcvd-notify-success.txt \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$TOADDR" else CreateMailMessage etc/templates/$TEMPLATE/faxrcvd-notify-error.txt \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$TOADDR" fi fi if [ -n "$SENDTO" ]; then # Create the document to attache if [ -z "$MSG" ]; then MailWithFAX success else MailWithFAX error fi fi else # # Generate notification mail for a failed attempt. # There is no file to send... # CreateMailMessage etc/templates/$TEMPLATE/faxrcvd-failure.txt \ 2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$TOADDR" fi CleanupPrivateTmp |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »linuxerr« (08.05.2007, 18:25)
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
finde ich echt klasse.Zitat
dateinamen der faxe die telefonnummer des absenders und das empfangsdatum/urzeit zu integrieren.
Zitat
die zeilen etwas erweitern und an anderer stelle in faxrcvd integrieren.
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Zitat
Original von pycak
Außerdem möchte ich vorerst die Faxe nicht per Mail versenden sondern nur Local speichern.Zitat
ok, dann muss der scriptcode etwas geändert werden. schreib ich mal morgen, wenn ich zeit habe. melde mich auf jeden fall.
Zitat
Mal eine andere Frage nebenbei:
hast du schon mal vesucht Hylafax mit einer Weboberfläche zu verbinden
oder ist es möglich per Web Hylafax zu steuern?
Die Idee ist von Ferne faxstat abzufragen oder ein Job faxrm JobId zu killen.
nein, hab ich nie versucht, weil ich hylafax zb zu hause vor vielleicht 3jahren ( ) oder so komplett durchkonfiguriert habe und es funktioniert zusammen mit dem anrufbeantworter tadellos und absolut stabil. killen musste ich da nie irgendwas oä.
die faxe lasse ich mir per mail als ps zustellen und gut!
richtig toll ist auch der anrufbeantworter vbox, da habe ich, als ich auch noch richtig viel zeit hatte, etliche ansagetexte erstellt, sodass jeder anrufer nach uhrzeit,wochentag und telefonnummer getrennt einen anderen ansagetext bekommt. am schönsten finde ich den text für "spezielle" telefonnummern:
klingling:
local: ja, hallo, schlaefendorf am apparat!
anrufer: ja hallo,.... blah blah blah, sabbelsabbel sabbel,.-.......
..... etwas später ......
local: ja, tut mir leid, ich bin leider nur der anrufbeantworter und habe keine ahnung, was sie wollen. ich lege deshalb jetzt auf. einen schönen tag noch!
anrufer: ???
es gibt einige, die sich zum glück nie wieder gemeldet haben.
Zitat
nein, hab ich nie versucht, weil ich hylafax zb zu hause vor vielleicht 3jahren ( Verrückt ) oder so komplett durchkonfiguriert habe und es funktioniert zusammen mit dem anrufbeantworter tadellos und absolut stabil. killen musste ich da nie irgendwas oä.
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)
Zitat
FILETYPE=
Zitat
SENDTO=
Benutzerinformationen überspringen
Prof. Dr. Schlaumeier
Wohnort: Mecklenburg, zur Entwicklungshilfe in Chemnitz/Sachsen ;-)