HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] mail fax as pdf
Go to /var/spool/fax (?)
Run faxrcvd like this:
bin/faxrcvd recvq/fax00001.tif ttyS1 log/c00000001 ""
""
Be SURE that in the etc/FaxDispatch file you have
correspondance betwen your device and the username
ttyS1) SENDTO=procadas@domain;; FILETYPE=pdf;;
--- rasmus.stokholm@xxxxxxxxxxxxx wrote:
> How do I run it from the shell
>
> I get a mail: Facsmilie not received.
>
> I'm in /var/spool/fax/
> And type: /var/spool/fax/bin/faxrcvd fax00001.tif
> ttyS1 00000001 ""
>
> -----Original Message-----
> From: hylafax-users-bounce@xxxxxxxxxxx
> [mailto:hylafax-users-bounce@xxxxxxxxxxx] On Behalf
> Of Pedro Rocadas
> Sent: 9. september 2004 15:04
> To: hylafax-users@xxxxxxxxxxx
> Subject: Re: [hylafax-users] mail fax as pdf
>
> Did you created FaxDispatch?
> other way to see what could be wrong is running
> faxrcvd from the shell.
>
> --- rasmus.stokholm@xxxxxxxxxxxxx wrote:
>
> > Still doesn't work,
> > Ok last resort, can you take a look at my files
> and
> > see if there is any
> > thing wrong.
> >
> > I'm not quite sure where the file should be
> > attached.
> > Maybe it is missing?
> >
> >
> > # FaxDispatch
> > # Dispatch fax to email depending on own MSN or
> > extention (ISDN lines) #
> > sourced from faxrcvd # if [ "$7" != "" ]; then
> > PHONEMATCH=$7$
> > USERENTRY=`grep -v "^#" etc/users | grep
> > "$PHONEMATCH"`
> > if [ "$USERENTRY" != "" ]; then
> > USERNAME=`echo $USERENTRY | awk '{print $1}'`
> > FILETYPE=pdf
> > SENDTO="$USERNAME"
> > ;;
> > fi
> > fi
> >
> >
> >
> > #
> > # faxrcvd file devID commID error-msg
> > #
> > if [ $# -lt 4 ]; then
> > echo "Usage: $0 file devID commID error-msg
> > [CIDNumber] [CIDName]
> > [destination]"
> > 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
> > }
> > . etc/setup.cache
> >
> > INFO=$SBIN/faxinfo
> > FAX2PS=$TIFFBIN/fax2ps
> > MIMENCODE=mimencode
> > ENCODING=base64
> > TIFF2PS=tiff2ps
> > PS2PDF=ps2pdf
> > TOADDR=FaxMaster
> > TIFFINFO=tiffinfo
> > NOTIFY_FAXMASTER=always
> >
> > #
> > # wraper for base64 encoding
> > #
> > # first try uuencode if it is not installed
> fallback
> > to
> > # metamails mimencode if it is also not installed
> > give an
> > # error message
> > #
> > function base64 {
> >
> > if [ -x /usr/bin/uuencode ]; then
> > /usr/bin/uuencode -m $1 $1 | /usr/bin/sed
> > '1d;$d'
> > elif [ -x /usr/bin/mimencode ]; then
> > /usr/bin/mimencode $1
> > else
> > echo "Error: No encoder for base64 found."
> > echo "Please install sharutils or
> metamail."
> > fi
> > }
> >
> > #
> > # Permit various types of attachment types: ps,
> tif,
> > pdf
> > # Note that non-ASCII filetypes require sharutils
> or
> > metamail. # pdf
> > requires tiff2ps and ps2pdf # FILETYPE=pdf
> >
> > #
> > # 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"
> > DEVICE="$2"
> > COMMID="$3"
> > MSG="$4"
> > CIDNUMBER="$5"
> > CIDNAME="$6"
> >
> > FILENAME=`echo $FILE | $SED -e 's/.tif//' -e
> > 's/recvq///'`
> >
> > if [ -f $FILE ]; then
> > #
> > # Check the sender's TSI and setup to dispatch
> > # facsimile received from well-known senders.
> > #
> > SUBADDR="`$INFO $FILE | $AWK -F: '/SubAddr/ {
> > print $2 }'
> > 2>/dev/null`"
> > SENDER="`$INFO $FILE | $AWK -F: '/Sender/ {
> > print $2 }'
> > 2>/dev/null`"
> > SENDTO=
> > if [ -f bin/FaxDispatch ]; then
> > . bin/FaxDispatch # NB: FaxDispatch sets SENDTO
> > based on
> > $7
> > fi
> > #
> > # 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" -a
> > "$NOTIFY_FAXMASTER" != "no" ]; then
> > (echo "To: $TOADDR"
> > echo "From: The HylaFAX Receive Agent <fax>"
> > echo "Subject: Facsimile received from $SENDER";
> > echo ""
> > echo "$FILE (ftp://$HOSTNAME:$PORT/$FILE):";
> $INFO
> > -n $FILE
> > echo "ReceivedOn: $DEVICE"
> > if [ "$MSG" ]; then
> > echo ""
> > echo "The full document was not received
> > because:"
> > echo ""
> > echo " $MSG"
> > echo ""
> > echo " ---- Transcript of session follows
> > ----"
> > echo ""
> > if [ -f log/c$COMMID ]; then
> > $SED -e '/-- data/d'
> > -e '/start.*timer/d' -e '/stop.*timer/d'
> > log/c$COMMID
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*