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] FaxDispatch logic help
Huh, my last reply didn't make the list.
OK I made the change and I'll keep an eye on it.
Thanks
Jason
..·><((((º>
> -----Original Message-----
> From: Chris Taylor [mailto:chris.taylor@xxxxxxxxxxxxx]
> Sent: Friday, May 18, 2007 12:17 PM
> To: Patrice Fournier
> Cc: Jason Staudenmayer; Hylafax Mailling List
> Subject: Re: [hylafax-users] FaxDispatch logic help
>
>
> Patrice Fournier wrote:
> > Quoting Chris Taylor <chris.taylor@xxxxxxxxxxxxx>:
> >
> >> Jason Staudenmayer wrote:
> >>> I've been search for some examples but I'm not finding many.
> >>> I'm finally setting up my dispatch script and so far I'm
> just using
> >>> a case for SENDER. What I'd like to do is also route
> other faxes by
> >>> CIDNUMBER.
> >>> I just want to make sure that no faxes are lost or double
> emails are
> >>> send. Below is what I have so far:
> >>>
> >>> case $SENDER in
> >>>
> >>> *305*243*5662*) SENDTO="health@xxxxxxxxxxxxx";;
> >>>
> >>> *) SENDTO=faxin@xxxxxxxxxxxxx;;
> >>>
> >>>
> >>> esac
> >>>
> >>> case $CIDNUMBER in
> >>>
> >>> *215*368*1960*) SENDTO="rigan@xxxxxxxxxxxxxxx";;
> >>>
> >>> *) SENDTO=faxin@xxxxxxxxxxxxx;;
> >>>
> >>> esac
> >>>
> >>> My question is do I only need the catch-all in the last case or
> >>> should each case have it?
> >>
> >> Every different case needs the *) entry.
> >
> > No. If you add a catch-all to every case (and all the cases
> are used to
> > set the SENDTO variable), only the last case block will
> actually work as
> > the catch-all entry will replace any value set by a
> previous case block.
> >
> > You should only put a catch-all entry in the first block
> (or set the
> > SENDTO default value before all the case block and don't set any
> > catch-all entry). You should also put the blocks from
> lowest priority to
> > highest. i.e. if a fax matches an entry in both SENDER and
> CIDNUMBER,
> > the entry of the last block will replace the entry set in
> the first block.
> >
> >
> > --Patrice Fournier
> > iFAX Solutions, Inc.
> > www.ifax.com
> >
>
> Yes, you could do it that way - setting it before the case blocks..
> That does actually make more sense - setting it in the first
> block isn't
> necessarily reliable - you may not have the correct header entries.
>
> Jason, this makes more sense actually..
>
> You'd do something like:
>
> SENDTO=faxin@xxxxxxxxxxxxx
>
> case $SENDER in
>
> *305*243*5662*) SENDTO="health@xxxxxxxxxxxxx";;
>
> esac
>
> case $CIDNUMBER in
>
> *215*368*1960*) SENDTO="rigan@xxxxxxxxxxxxxxx";;
>
> esac
>
>
>
>
> Chris
>
____________________ 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*