Koozali.org: home of the SME Server

Hylafax su Sme Server 7.x: riceve i fax in recqv ma non li inoltra via mail

Offline oligostark

  • *
  • 7
  • +0/-0
Code: [Select]
root@serverfax:/var/spool/hylafax# ls -la /var/spool/hylafax/bin
total 184
drwxr-xrwx  2 root fax   4096 apr  1 15:36 .
drwxrwxrwx 17 uucp fax   4096 apr  1 10:37 ..
-rwxr-xrwx  1 root fax    781 apr 28  2013 archive
-rwxr-xrwx  1 root fax   4863 giu  6  2012 b64-encode.awk
-rw-r--rw-  1 root fax  19122 apr 28  2013 common-functions
-rw-r--rw-  1 root fax  40870 apr 28  2013 dictionary
lrwxrwxrwx  1 root fax     47 mar 28 12:21 dynconf.php -> /var/www/avantfax/avantfax/includes/dynconf.php
-rw-rw-rw-  1 root fax     88 apr  1 12:45 FaxDispatch~
-rwxrwxrwx  1 root root  6164 apr  1 13:10 faxrcvd
-rwxrwxrwx  1 root fax   6180 apr  1 13:07 faxrcvd~
-rwxr-xrwx  1 root fax   3618 apr 28  2013 mkcover
-rwxr-xrwx  1 root fax   6120 apr 28  2013 notify
-rwxr-xrwx  1 root fax   2180 apr 28  2013 notify-4.1
-rwxr-xrwx  1 root fax  10173 apr 28  2013 notify.awk
lrwxrwxrwx  1 root fax     46 mar 28 12:35 notify.php -> /var/www/avantfax/avantfax/includes/notify.php
-rwxr-xrwx  1 root fax   6478 apr 28  2013 pcl2fax
lrwxrwxrwx  1 root fax     10 mar 18 10:52 pdf2fax -> pdf2fax.gs
-rwxr-xrwx  1 root fax   5646 apr 28  2013 pdf2fax.gs
-rwxr-xrwx  1 root fax   5609 apr 28  2013 pollrcvd
lrwxrwxrwx  1 root fax      9 mar 18 10:52 ps2fax -> ps2fax.gs
-rwxr-xrwx  1 root fax   5649 apr 28  2013 ps2fax.gs
-rwxr-xrwx  1 root fax   3610 giu  6  2012 qp-encode.awk
-rwxr-xrwx  1 root fax   6017 apr 28  2013 tiff2fax
-rwxr-xrwx  1 root fax   3436 apr 28  2013 tiff2pdf
-rwxr-xrwx  1 root fax   6098 apr 28  2013 wedged


Offline Stefano

  • *
  • 10,894
  • +3/-0
cosa contiene il tuo file faxrcvd?

questo è quello che ho io
Code: [Select]
#! /bin/bash
#       $Id: faxrcvd.sh.in,v 1.49.4.1 2007/09/24 19:13:47 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(8C)
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
TIFF2PDF=bin/tiff2pdf
TTYCMD=tty

. etc/setup.cache
. bin/common-functions

INFO=$SBIN/faxinfo
FAX2PS=$TIFFBIN/fax2ps
TIFF2PS=tiff2ps
TOADDR=FaxMaster
FROMADDR=fax
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
# Multiple file types may be specified by separating them with
# whitespace; in that case a separate attachment for each filetype
# will be created.
#
FILETYPE=ps
SENDTO=

#
# 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"

FILENAME=`echo $FILE | $SED -e 's/\.tif//' -e 's/recvq\///'`

SetupPrivateTmp

parseFaxInfo $FILE

MIMEBOUNDARY="NextPart$$"

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

if [ -f etc/templates/$TEMPLATE/hook.sh ]
then
    # Any hooks that the templates need
    . etc/templates/$TEMPLATE/hook.sh
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"
    files_1=$FILE;
    filetype_1=TIFF;
    nfiles=1;
    for ft in $FILETYPE
    do
        ATTACH_ARGS="$ATTACH_ARGS "`BuildAttachArgs $ft`
    done
    eval CreateMailMessage $template $ATTACH_ARGS \
        2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$SENDTO"

}

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

e, inoltre, cosa contiene Faxdispatch?

Offline Stefano

  • *
  • 10,894
  • +3/-0
e verifica anche FaxDispatch  nella dir /etc di hylafax

infine, noto che tu hai tutti i file a root:fax, mentre sulle mie installazioni sono a root:root

infine, come hai installato avantfax? e come lo hai rimosso?

Offline oligostark

  • *
  • 7
  • +0/-0
FaxDispatch:
Code: [Select]
#----------------------------
FILETYPE=pdf;
SENDTO=pippo@pluto.local;
#----------------------------

il relayhost dove punta postfix è un win2003server con dominio AD. Quindi dominio .local interno alla LAN


faxrcvd:
Code: [Select]
#! /bin/bash
# $Id$
#
# 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.
#

. bin/common-functions

#
# faxrcvd file devID commID error-msg
#
if [ $# -lt 4 ]; then
    echo "Usage: $0 file devID commID error-msg [ callID-1 [ callID-2 [ ... [ callID-n ] ] ] ]"
    hfExit 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
    hfExit 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
TIFF2PDF=bin/tiff2pdf
TTYCMD=tty

. etc/setup.cache

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
# Multiple file types may be specified by separating them with
# whitespace; in that case a separate attachment for each filetype
# will be created.
#
FILETYPE=ps
SENDTO=

#
# 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$$"

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

#
# Our man page says to set SENDTO1...x if they want additional
# receipients. We reserve $SENDTO0 for our initial SENDTO
if [ -z "$SENDTO0" ]
then
        SENDTO0="$SENDTO"
fi

if [ -f etc/templates/$TEMPLATE/hook.sh ]
then
    # Any hooks that the templates need
    . etc/templates/$TEMPLATE/hook.sh
fi


## MailWithFAX <type>
## Email the <type> template,adding the attachments according
## to $FILETYPE to $SENDTO for each of $SENDTOx recipients
##
## 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"
    files_1=$FILE;
    filetype_1=TIFF;
    nfiles=1;
    for ft in $FILETYPE
    do
ATTACH_ARGS="$ATTACH_ARGS "`BuildAttachArgs $ft`
    done

    i=0
    SENDTO="$SENDTO0"
    while [ -n "$SENDTO" ]
    do
            eval CreateMailMessage $template $ATTACH_ARGS \
                2>$ERRORSTO | $SENDMAIL -f"$FROMADDR" -oi "$SENDTO"

            i=`expr $i + 1`
            eval SENDTO='"$SENDTO'$i'"'
    done
}

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 "$SENDTO0" ]; then
# Create the document to attach
        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
Non gli ho apportato modifiche.

anche faxrcvd prima era root:fax. Guardando quello che avete postato ho messo root:root. Poi ho dato R&W a tutti per evitare problemi sui permessi.

avantfax è stato installato con lo script fornito ed è ancora presente. ho solo rimosso il link a faxrcvd.php èer vedere se qualcosa migliorava ma non è cambiato nulla.

se lancio manualmente lo script faxrcvd con gli argomenti giusti funziona tutto, la mail arriva.
è come se hylafax lanciasse faxrcvd.php (che deve essere lanciato dalla configurazione del modem ma senza gli argomenti che il log elenca e che servono a faxrcvd).

Offline Stefano

  • *
  • 10,894
  • +3/-0
il contenuto di FaxDispatch è quello del file in /bin o in /etc?

il faxrcvd mi pare corretto anche se differente in alcuni punti

mi confermi che faxgetty sta richiamando ancora faxrcvd.php?

mi dai l'output di:
Code: [Select]
ls -la /var/spool/hylafax/etc

e di
Code: [Select]
more ls -la /var/spool/hylafax/etc/config.ttyS0

(naturalmente se hai il modem seriale.. altrimenti il file config ttyXX in uso)

Offline oligostark

  • *
  • 7
  • +0/-0
FaxDispatch in /etc (subito creato in bin e poi messo in etc) (funziona perchè da riga di comando va)

anche con tutti i file di bin root:root chiama sempre faxrcvd.php

ETC:
Code: [Select]
root@serverfax:/# ls -la /var/spool/hylafax/etc/
total 140
drwxr-xrwx  4 root fax  4096 apr  1 13:09 .
drwxrwxrwx 17 uucp fax  4096 apr  1 10:37 ..
-rw-r--rw-  1 root fax  2874 giu  5  2013 aaaaaaa
drwxr-xrwx  2 root fax  4096 mar 28 09:23 abackup
-rw-r--rw-  1 root fax   197 giu  6  2013 config
-rw-r--rw-  1 root fax   260 giu  4  2013 config.sav
-rw-r--rw-  1 root fax  4917 giu  7  2013 config.ttyS0
-rw-r--rw-  1 uucp fax  4655 mar 18 11:09 config.ttyS0~
-rw-r--rw-  1 root fax 10368 giu  6  2012 cover.templ
-rw-r--rw-  1 root fax  1855 giu  6  2012 dialrules
-rw-r--rw-  1 root fax  2397 giu  5  2013 dialrules.europe
-rw-r--rw-  1 root fax  2093 giu  6  2012 dialrules.sf-ba
-rw-r--rw-  1 root fax  7384 set 10  2012 faxcover.ps
-rw-rw-rw-  1 root fax    99 apr  1 13:03 FaxDispatch
-rw-r--rw-  1 root fax   167 giu  6  2012 faxmail.ps
-rw-r--rw-  1 root fax  2401 giu  6  2012 hfaxd.conf
-rw----rw-  1 uucp fax   293 mar 28 09:51 hosts.hfaxd
-rw-r--rw-  1 root fax  1436 giu  4  2013 hyla.conf
-rw-r--rw-  1 root fax 14072 giu  6  2012 lutRS18.pcf
-rw-r--rw-  1 root fax  3247 giu  4  2013 pagesizes
-rw-r--rw-  1 root fax    51 giu  4  2013 sendfax.conf
-r--r--rw-  1 root fax  1157 giu  5  2013 setup.cache
-r--r--rw-  1 root fax   781 giu  5  2013 setup.modem
drwxr-xrwx 11 root fax  4096 mar 28 09:23 templates
-rw-r--rw-  1 root fax  8801 set 10  2012 typerules

config.ttyS0:
Code: [Select]
root@serverfax:/# more /var/spool/hylafax/etc/config.ttyS0
# $Id$
#
# HylaFAX Facsimile Software
#
# Copyright (c) 1990-1996 Sam Leffler
# Copyright (c) 1991-1996 Silicon Graphics, Inc.
# HylaFAX is a trademark of Silicon Graphics, Inc.
#
# 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.
#

#
# Generic Class 1.0 modem configuration.
#
# EDIT THIS CONFIGURATION TO REFLECT YOUR SETUP
#
CountryCode: 39
AreaCode: 0141
FAXNumber: 01413333333
LongDistancePrefix: 1
InternationalPrefix: 011
DialStringRules: etc/dialrules
ServerTracing: 1
SessionTracing: 11
RecvFileMode: 0600
LogFileMode: 0600
DeviceMode: 0600
RingsBeforeAnswer: 1
SpeakerVolume: medium
GettyArgs: "-h %l dx_%s"
LocalIdentifier: "XXXXXX"
TagLineFont: etc/lutRS18.pcf
TagLineFormat: "Da %%l|%c|Pagina %%P di %%T"
MaxRecvPages: 25
NotifyCmd: bin/notify.php
#
#
# Modem-related stuff: should reflect modem command interface
# and hardware connection/cabling (e.g. flow control).
#
# We use "ModemType: Class1" with "Class1Cmd: AT+FCLASS=1.0" for now
#
ModemType: Class2 # use this to supply a hint
ModemRate: 19200 # rate for DCE-DTE communication
#ModemFlowControl: xonxoff # XON/XOFF flow control assumed
#
#ModemSetupDTRCmd: AT&D2 # setup so DTR drop resets modem
#ModemSetupDCDCmd: AT&C1 # setup so DCD follows carrier
#GettyArgs: "-h %l dx_%s" # modem must auto-detect fax/data
#
# We can append the "@" symbol to the dial string so that
# the modem will wait 5 seconds before attempting to connect
# and return result codes that distinguish between no carrier
# and no answer.  This makes it possible to avoid problems with
# repeatedly dialing a number that doesn't have a fax machine
# (kudos to Stuart Lynne for this trick.)
#
# NB: If you need to prefix phone numbers to get through a PBX,
#     put it in the ModemDialCmd; e.g. "DT9%s@".
#
#ModemDialCmd: ATDT%s # T for tone dialing
ModemDialCmd:  ATX1DT,0,%s
#
# Other possible configuration stuff.  The default strings are
# shown below.  Only those that are different from the defaults
# need to be included in the configuration file.
#
#ModemResetCmds: "" # stuff to do when modem is rese
t
#ModemAnswerCmd: ATA # use this to answer phone
#ModemNoFlowCmd: AT&K # disable flow control cmd
#ModemHardFlowCmd: AT&K3 # hardware flow control cmd
#ModemSoftFlowCmd: AT&K4 # software flow control cmd
#ModemNoAutoAnswerCmd: ATS0=0 # disable auto-answer
#
# Set modem speaker volume commands: OFF QUIET LOW MEDIUM HIGH.
# Note that we both turn the speaker on/off and set volume.
#
#ModemSetVolumeCmd: "ATM0 ATL0M1 ATL1M1 ATL2M1 ATL3M1"
#ModemEchoOffCmd: ATE0 # disable command echo
#ModemVerboseResultsCmd: ATV1 # enable verbose command results
#ModemResultCodesCmd: ATQ0 # enable result codes
#ModemOnHookCmd: ATH0 # place phone on hook (hangup)
#ModemSoftResetCmd: ATZ # do soft reset of modem
#ModemSoftResetCmdDelay: 3000 # pause after soft reset
#ModemWaitTimeCmd: ATS7=60 # wait 60 seconds for carrier
#ModemCommaPauseTimeCmd: ATS8=2 # comma pause time is 2 seconds
#ModemRecvFillOrder: LSB2MSB # bit order of received facsimile
#ModemSendFillOrder: LSB2MSB # bit order modem expects for transmit
#
Class1Cmd: AT+FCLASS=1.0 # command to enter class 1.0
Class1PPMWaitCmd: AT+FTS=7 # command to stop and wait before PPM
Class1TCFWaitCmd: AT+FTS=7 # command to stop and wait before TCF
Class1EOPWaitCmd: AT+FTS=9 # command to stop and wait before EOP
Class1SwitchingCmd: AT+FRS=7 # command to stop and listen for silence
Class1RecvAbortOK: 200 # wait 200ms for abort response
Class1FrameOverhead: 4 # 4 byte overhead in recvd HDLC frames
Class1RecvIdentTimer: 40000 # 35+5secs waiting for ident frames
Class1TCFMaxNonZero: 10 # max 10% of data may be non-zero
Class1TCFMinRun: 1000 # min run is 2/3rds of TCF duration

#
## AvantFAX configuration
#
FaxrcvdCmd:     bin/faxrcvd.php
DynamicConfig:  bin/dynconf.php
UseJobTSI:      true

In questo file avantfax aggiunge 3 righe. Nella prima spunta il famigerato faxrcvd.php ma dovrebbe lavorare in parallelo con il faxrcvd e non comparire nel log di hylafax. Credo.
« Last Edit: April 01, 2014, 05:00:39 PM by oligostark »

Offline Stefano

  • *
  • 10,894
  • +3/-0
ciao

riesco a rispondere solo ora

commenta le tre righe finali con un # davanti, riavvia hylafax (service hylafax restart) e verifica

Offline oligostark

  • *
  • 7
  • +0/-0
Eliminando la configurazione di avantfax tutto torna a funzionare!
Grazie.
Probabilmente la stringa
Code: [Select]
FaxrcvdCmd:     bin/faxrcvd.php impone a hylafax di lanciare faxrcvd.php e non faxrcvd.
Ero convinto che avantfax ci avesse messo del suo ed ero quasi pronto a reinstallare tutto tranne l'interfaccia web.
Così si è sistemato tutto.
Ora mi concentro su come personalizzare il FaxDispatch per avere quello che voglio. Partendo da una base funzionante!
Ancora Grazie.
Colazione pagata se passi da Asti...

Offline Stefano

  • *
  • 10,894
  • +3/-0
definisci cosa vuoi fare che magari ti si aiuta

quanto alla colazione, segnata.. ;-)

Offline Fumetto

  • *
  • 899
  • +1/-0
Stefano avrebbe da colazionare per un anno e passa se fà il giro d'Italia... :D

Offline Stefano

  • *
  • 10,894
  • +3/-0
non solo colazione.. tra pizze, pasti vari e pernottamenti.. (e anche fuori italia.. c'è un messicano che mi ha promesso tequila ad libitum :-D)

quasi quasi faccio il giro di tutti i post, mi segno le promesse e inizio ad incassare..

Offline oligostark

  • *
  • 7
  • +0/-0
Qui (almeno limitatamente alle colazioni) le promesse si mantengono.
Stamattina sto migrando un mailserver e no ho secondi a sufficienza per spiegarti bene ma mi piacerebbe cambiare destinatario mail in base all'orario di arrivo del fax:
7.00-21.00 pippo@pluto.it
20.00-9.00 paperino@pluto.it

Offline Stefano

  • *
  • 10,894
  • +3/-0
sapendo di chi è il fax, mi metto sull'attenti e mi segno il "credito" ;-)

relativamente a quello che vuoi fare, non mi pare che sia contemplato, ma penso che un paio di script in /etc/cron.d/ che modifichino il file..

oppure ne crei 2 identici meno che per il destinatario (es. FaxDispatchDay e FaxDispatchNight), e gli script in /etc/cron.d si occupano solo di creare un link simbolico chiamato FaxDispatch nella dir /etc di hylafax..

la cosa dovrebbe sopravvivere anche ad aggiornamenti di hyla in quanto non dovrebbe (l'aggiornamento) sovrascrivere il file FaxDispatch se lo trova (essendo però un link non sono certo al 100%)

Offline oligostark

  • *
  • 7
  • +0/-0
Modificato un po' in ritardo... :lol: :lol: :lol: :lol: Nessun problema comunque.... :cool: :cool: :cool:

Grazie per le idee che sembrano avere i presupposti per funzionare.

Ti aspetto!