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 question



What you're asking for is basic scripting help.  The way you have it
written, each of the cases is executed, but logically, if the device is
ttyS0 and the sender is ABC, the SENDTO will be set to blank2@xxxxxxxxx,
since both conditions are true, and the second case statement simply
overwrites the value set by the first.

You'll either want to nest case statements or use if-then logic to cover
each combination.

> I wrote the following FaxDispatch script to route incoming faxes by
> various criteria, such as by device or sender.
>
> In practice, the script only uses the last case criteria. How can I make
> it use all criteria ?
>
> My FaxDispatch script is as follows
>
> FILETYPE=tif;
>
> case "$DEVICE" in
>        ttyS0)  SENDTO=blank@xxxxxxxxx; FILETYPE=tif;;
> esac
>
> case "$SENDER" in
>         ABC*)  SENDTO=blank2@xxxxxxxxx; FILETYPE=tif;;
>         *1234567899) SENDTO=blank3@xxxxxxxxx;
> FILETYPE=tif;;
> esac
>
>
>
> ____________________ 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*
>
>



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




Project hosted by iFAX Solutions