---------- Original Message -----------
From: Chris Weiss <
cweiss@xxxxxxxxx>
To: Walid Aweiwi <
waweiwi@xxxxxxxxx>
Cc:
hylafax-users@xxxxxxxxxxx,
hylafax-users@xxxxxxxxxxxxxxxxxxxxx
Sent: Mon, 6 Jul 2009 10:25:36 -0500
Subject: Re: [hylafax-users] Secure Email2Fax via internet
> define "secure"
>
> On Mon, Jul 6, 2009 at 9:16 AM, Walid Aweiwi <
waweiwi@xxxxxxxxx> wrote:
>
> > Hi All,
> >
> > I have configured my efax system, and I succeed to send fax using
> > email2fax feature using the internet but I need to secure the posting
> > process to my fax.
> >
> > I'm using postfix and reached the point to secure submitting faxes to
> > my fax system, i tried to use -o sendfax command but it didn't effect.
> >
> > Any idea????
> >
> > more /usr/local/bin/mail2fax.sh
> > #!/bin/sh
> > #
> > # simple mail-to-fax utility using both faxmail and sendfax.
> > #
> > # - Lee Howard
> > #
> >
> > #
> > # Mail addresses can be three ways:
> > # 1)
user@xxxxxxxx
> > # 2) "User Name" <
user@xxxxxxxx>
> > # 3)
user@xxxxxxxx (User Name)
> > #
> > # in the latter cases, quotes may or may not be used,
> > # there may or may not be any User Name at all, and User Name
> > # may come before or after
user@xxxxxxxx.
> > #
> > # We need to make sure we handle all these possibilities for
> > # both TO and FROM situations. Return-Path is different.
> > #
> >
> > RANDOMFAX=/tmp/mail2fax.$$
> > mkdir $RANDOMFAX
> >
> > cat >> $RANDOMFAX/_message_
> >
> > # Uncomment the following three lines for debugging.
> > #set -x
> > #exec > /tmp/mail2faxlog.$$ 2>&1
> > #cp $RANDOMFAX/_message_ /tmp/mail2faxmail.$$
> >
> > JOBID=`grep -e "^subject:" -i $RANDOMFAX/_message_ | sed q | sed
> > 's/^[^:]*: *//g'`
> > TOLINE=`grep -e "^to:" -i $RANDOMFAX/_message_ | sed q`
> > FROMLINE=`grep -e "^from:" -i $RANDOMFAX/_message_ | sed q`
> > if [ "`echo $TOLINE | grep '<.*>'`" != "" ]; then
> > TONUMBER=`echo $TOLINE| sed -e 's/.*<\(.*[^@]*\)@.*>.*/\1/'`
> > else
> > TONUMBER=`echo $TOLINE| sed -e 's/^[Tt]o://g' -e 's/[
> > ]*\(.*[^@]*\)@.*/\1/'`
> > fi
> > if [ "`echo $FROMLINE | grep '<.*>'`" != "" ]; then
> > FROMPATH=`echo $FROMLINE| sed -e 's/.*<\(.*\).*>.*/\1/'`
> > else
> > FROMPATH=`echo $FROMLINE| sed -e 's/^[Ff]rom://g' -e 's/[
> > ]*\([^ ]*\).*/\1/'`
> > fi
> >
> > cat $RANDOMFAX/_message_ | faxmail -v -T $FROMPATH | sendfax -vv -n -D
> > -f "$FROMPATH" -i "$JOBID" -d $TONUMBER
> >
> >
> > rm -rf $RANDOMFAX
> >
> > 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@xxxxxxxxx*
> >
> >