Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] qmail fax to email and email to fax setup



Il sab, 2003-09-20 alle 14:37, mike ha scritto:
> Hi
> Any one using such setup .I would appretiate any orientation
> on a howto ?
>  

... something about this? ....
NOTE: under costruction ....

Ciao.
Dario

[lesca@lesca cmd]$ cat qmail-fax.sh
#!/bin/bash
#
#   mailfax - email to fax gateway for qmail.
#
#   This file should be installed as /var/spool/hylafax/bin/qmail-fax.sh
#   and the following changes made to the qmail configuration:
#
#   Add the following to /var/qmail/control/virtualdomains
#       .fax:fax
#
#   Add the following to /var/qmail/alias/.qmail-fax-default
#       | /var/spool/hylafax/bin/qmail-fax.sh
#
#   Send mail
#   % echo bye | mutt -a /tmp/file.html Name.Secondname@xxxxxxxxxxxx
#
from=$SENDER
to="$EXT@$HOST2"
 
logger -p mail.notice -t qmail-fax "Send Fax Via E-Mail (From $from To
$to)"
 
#exit 0
(
ftmp=/tmp/mhs$$
rm -rf $ftmp.d
mkdir $ftmp.d
cd $ftmp.d
mhstore + -auto -file - -noverbose 2>/dev/null
 
for finp in $ftmp.d/*
do
        tipo=$(file -b $finp)
        case "$tipo" in
        HTML\ *)
                /usr/bin/htmldoc --webpage -t ps $finp |
                /usr/bin/sendfax -D -n -f "$from" -d "$to"
        ;;
        PDF\ *) echo "PDF:$finp"
        ;;
        *)
                echo "Warning: File $finp ($tipo) wrong Type!."
        ;;
        esac
done
 
rm -rf $ftmp.d
 
) |
logger -p mail.notice -t qmail-fax
 
exit 0



____________________ 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@xxxxxxxxxxxx*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services