Hylafax configuration bug

Yesterday I updated our production server to the latest set of packages pushed from upstream (6.8 …?).
The upgrade went on well if not for one small problem with the configuration of Hylafax.

The WEB GUI is set up as follow :

but the content of the configuration file for fax dispatch is :


#!/bin/sh
# ================= DO NOT MODIFY THIS FILE =================
# 
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at https://dev.nethesis.it/projects/nethserver/wiki/NethServer
# original work from http://www.contribs.org/development/
#
# Copyright (C) 2013 Nethesis S.r.l. 
# http://www.nethesis.it - support@nethesis.it
# 

SENDTO=
FILETYPE="pdf"
NOTIFY_FAXMASTER=errors
LANG=it_IT


. /var/spool/hylafax/etc/FaxDispatch.iaxmodem
DISPATCH_DIR=/var/spool/hylafax/etc/dispatch

for f in `ls $DISPATCH_DIR`
do
    if [ -x $DISPATCH_DIR/$f ]; then
        $DISPATCH_DIR/$f "$FILE" "$DEVICE"
    fi
done

as you see, there are two issues :

  1. The language is set to be English in the GUi but is still Italian in the form (the receive reports are in Italian)

  2. The SENDTO field is empty and no faxes are dispatched.

I manually modified the file as follow and now faxes are delivered with proper report :

SENDTO=faxmaster
FILETYPE="pdf"
NOTIFY_FAXMASTER=errors
LANG=en_EN

My Hylafax version is :

Installed Packages
Name        : hylafax
Arch        : x86_64
Version     : 5.2.5
Release     : 1.nh
Size        : 2.7 M
Repo        : installed
From repo   : nethserver-base

Regards

Massimo

Since that file is a template (look at the first lines at top of file…DO NOT MODIFY…) you simply have to run
expand-template <filename>

This really showcases the power of the e-smith templates system.
@maxbet, could you please expand the template and check that the content is correct? Or if it reverts back to the wrong content you found after the update? (make a copy before the expand-template)

I can’t reproduce the problem, I think that your config (in the db) is wrong. If I’m right, the expand-template will revert to the wrong file.
To see the config:
config show hylafax

Mine has:
Lang=it_IT
SendTo=faxmaster

@filippo_carletti , I did as requested; below the outcome of the test.

Configuration database before expanding the template :

hylafax=service
    AreaCode=0512
    AreaNumber=
    ClientShowReceived=disabled
    CountryCode=86
    DateFormat=DMY
    Debug=disabled
    DispatchFileType=pdf
    FaxDevice=ttyS1
    FaxName=Dalmec Suzhou
    FaxNumber=69363761
    InternationalPrefix=00
    Lang=it_IT
    LongDistance=0
    Mail2Fax=disabled
    Mode=both
    NotifyFileType=pdf
    NotifyMaster=errors
    PBXPrefix=
    PaperSize=A4
    PrintReceived=disabled
    PrinterName= 
    Resolution=196
    RingsBeforeAnswer=1
    SambaFax=disabled
    SambaFaxName=SambaFax
    SendReport=enabled
    SendTo=faxmaster
    SummaryReport=enabled
    TCPPort=4559
    WaitDialTone=enabled
    access=private
    status=enabled

I expanded the template FaxDispatch and, as expected, it reverted back to the same content I found after the update.

During the expansion, NS had a warning message :

[root@mail etc]# expand-template /var/spool/hylafax/etc/FaxDispatch
WARNING in /etc/e-smith/templates//var/spool/hylafax/etc/FaxDispatch/10base: Use of uninitialized value $sendTo in concatenation (.) or string at /etc/e-smith/templates//var/spool/hylafax/etc/FaxDispatch/10base line 20.
WARNING: Template processing succeeded for //var/spool/hylafax/etc/FaxDispatch: 1 fragment generated warnings at /sbin/e-smith/expand-template line 45

Few comments on the content after the update (wrong one) :

  • NS is configured for English language (as seen in the GUI picture) but the configuration still show Italian

  • The SendTo filed is properly configured (in the DB) but not so in the template

Regards

Massimo

Line 20 of /etc/e-smith/templates//var/spool/hylafax/etc/FaxDispatch/10base contains:
$OUT.="SENDTO=$sendTo\n";

I can’t figure out how it could give out an error.

Do you have a custom template for FaxDispatch?
Could you show the output of
rpm -V nethserver-hylafax-1.1.6-1.ns6.noarch

Filippo,

my installation is a standard install of NS, the only changes made to the system are :

  • Install apcupsd instead of nut

  • Change the FaxDispatch file as described in my first post

The command you asked me to test did not have any console output :

Regards

Massimo

That’s good, it means the package is good, file are like they should be. :slight_smile:
This puzzles me: templates are ok, but you get an expansion error, while I do not.
I’ll try to reproduce the error on a third system.