HylaFAX The world's most advanced open source fax server |
Bodo, Thanks for all your suggestions. Everything is working beautifully and much easier to understand. Marty Westra
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marty Westra wrote, on 26.07.2008 03:58: | | Here’s my FaxDispatch file (sanitized, of course):
the file is a bit too "sanitized". Since you made all e-mail addresses the same, I cannot guess how exactly you want to distribute the documents to your users. I suggest to use something like user1@xxxxxxxxxxx, user2@xxxxxxxxxxx etc. to make clear whether the addresses are the same or different.
| | ttyS14) SENDTO=xxxxxx@xxxxxxxxxxxxxxxx;; | | ttyS0) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx;; | | *) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx;; | | esac Here is a bug in your shell script. The following case statement will overwrite any SENDTO value you have set above because it has a default(*) case | case "$SENDER" in | | *815*389*xxxx*) SENDTO= | xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; | | *61294xxxx *) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; | FILETYPE=tif;; [...] | *338*xxxx*) SENDTO= | xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; | | 0) SENDTO= | xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; | | *) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; | | esac If you set FILETYPE=tif in (nearly) every case, I suggest to do this once before the case statement and optionally change it in some cases if necessary.
SENDTO= # first I set SENDTO based on SENDER case "$SENDER" in # note: there must not be a space after SENDTO= ~ *815*389*xxxx*) SENDTO=user1@xxxxxxxxxxxxxxxx ;;
[...] ~ *1*605*338*xxxx*) SENDTO=user7@xxxxxxxxxxxxxxxx ;; # example for a user that should get a different file format ~ *338*xxxx*) SENDTO=user8@xxxxxxxxxxxxxxxx ; FILETYPE=pdf ;;
# now I set SENDTO based on DEVICE only if it is not yet set if [ -z "$SENDTO" ] then ~ case "$DEVICE" in
~ esac fi
user for some devices and select a user based on the sender for others.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org iEYEARECAAYFAkiK7NAACgkQnMz9fgzDSqfd3QCeOpHwDVJFyX00kwOcXUye9fHg oG4An0h2vYNPON+tZM0aLdmRM0wgoLSL =P2il -----END PGP SIGNATURE-----
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* From: hylafax-users-bounce@xxxxxxxxxxx [mailto:hylafax-users-bounce@xxxxxxxxxxx]
On Behalf Of Marty Westra Hello, HylaFAX version 4.2.1 built Fri Feb 4 12:26:48 EST 2005 for i686-pc-linux-gnu on Redhat Fedora Core 4. 2 external US Robotics modems on ttyS0 and ttyS14. I’ve had a single modem (ttyS0) for several years. Added a second modem (ttyS14) and want to redirect all faxes that come in on this second modem to a particular email address. Prior to adding this second modem, I was using the $SENDER case statement to direct faxes to the proper person, and this part still works fine after adding the second modem. But it is totally ignoring the $DEVICE case statement. Can anyone see anything blatantly wrong with this? Any ideas how to fix it? Thanks, Marty Westra Electronic Systems, Inc. Here’s my FaxDispatch file (sanitized, of course): case "$DEVICE" in ttyS14) SENDTO=xxxxxx@xxxxxxxxxxxxxxxx;; ttyS0) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx;; *) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx;; esac case "$SENDER" in *815*389*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*61294xxxx *) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*952*946*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*141436xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
* xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*734*722*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*608*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763391xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763*235*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*9763235xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763*595*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763*253*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763*253*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*763*253*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*1*605*338*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*338*xxxx*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; 0) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;;
*) SENDTO= xxxxxx@xxxxxxxxxxxxxxxx; FILETYPE=tif;; esac
-------------------------------------------------------- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Electronic Systems, Inc. - Sioux Falls, SD |