Re: NOTIFY_FAXMASTER=errors|"errors"|error does not seem to work

Matthias Stadelmeyer <[email protected]> Sun, 5 Jun 2016 14:23:19 +0200
Newsgroups gmane.comp.telephony.fax.hylafax.user
Message-ID <CAMSKi3-=OB3x9MUt6+MLj24aXyzfu+yPzDEEsscd30Cg4qe8-Q@mail.gmail.com>
Mona Meyer <meymona <at> gmail.com> writes:

> My File /etc/hylafax/FaxNotify has three lines:
> RETURNFILETYPE=pdf
> TEMPLATE=de
> NOTIFY_FAXMASTER=errors
>
> The first two lines are obviously working: After sending a fax, the user
> gets an email in german with the faxed document attached as pdf.
>
> No, no matter which user sends a fax, there are always _two_ emails sent:
> One in german to the sending user, and another in english to the
FaxMaster.
>

I think there is indeed something wrong with the script.

After a job is successfully submitted, syslog shows the script "notify"
executed as follows:

NOTIFY: bin/notify "doneq/q17" "done" "0:00:46"

In /var/spool/hylafax/bin/notify "WHY" is therefore set to "done":
line 55: WHY=$2

But to avoid a second message to faxmaster in case of a success "WHY" should
have been set to "success":

case "$NOTIFY_FAXMASTER:$WHY" in
    "always:"*)                     do_faxmaster;;
    "yes:"*)                        do_faxmaster;;

    "errors:success")               ;;              # Not errors
    "errors:blocked")               ;;              # Not errors
    "errors:"*)                     do_faxmaster;;  # errors

    *)                              ;;              # Do nothing;
esac

So it seems that you hust have to change "errors:success" to "errors:done".
But who knows wheter someting else depends on the origin setting.