Migrating from SME 9.2 - nethserver-hylafax

NethServer Version: nethserver-7.9.2009-x86_64
Module: nethserver-hylafax

Still a few miles to go, but looking good so far with my migration from SME.

Here I’ stumbling over nethserver-hylafax. The automated script did not work for me. I had to use the default setup process for hylafax. Modem is up an running, I’m able to send and receive faxes. It’s not quite clear to me, who the faxes receive in the LAN. I’ve two users in the faxmember group, one receives incoming faxes, the other not.

Another problem/error is the configuration page ment to call from cockpit. Not sure if this is a bug, therefore no bug opened. Here’s the message while trying to open the page:

Forbidden
You don’t have permission to access /en-US/FaxServer on this server.

No difference with IP or FQHN.

logs are showing:

client denied by server configuration: /etc/httpd/htdocs

and

Get /en-US/FaxServer HTTP/1.1 403 217

All language ist set to de_DE.

Where do I have to investigate to get rid of this error?

edit: Forgot to mention - I removed iaxmodem. My modem is old style on ttyS0.

I have to move this up, sorry. The issue with faxreceivers is solved.

But the last day there was an update for the NS. I can only assume that this causes the modem in a wedged modus. It took me some time to get the fax running again.

How can I make the configuration persistent? I saw defaults in /var/lib/nethserver/db/configuartion/defaults/hylafax, in /etc/e-smith/templates/etc/hylafax/hyla.conf, and in /etc/e-smith/templates/var/spool/hylafax/etc/

I don’t want lo loose my hylafax-settings during updates of other programs of the NS.

@schulzstefan

Hi Stefan

The template is the same as in SME, so you should be familiar with it…

Copy over the following:

/etc/e-smith/templates/etc/hylafax/hyla.conf -> /etc/e-smith/templates-custom/etc/hylafax/hyla.conf
/etc/e-smith/templates/var/spool/hylafax/etc/ -> /etc/e-smith/templates-custom/var/spool/hylafax/etc/

Make your customizations in the templates-custom versions, expand your template (Still the same command as in SME…):

expand-template /etc/hylafax/hyla.conf
expand-template /var/spool/hylafax/etc/

Then restart the involved services (or the whole server).
These configs are now update safe… :slight_smile:

Note:
I’m not 100% sure, but AFAIK, there are no updates to
/var/lib/nethserver/db/configuartion/defaults/hylafax
so it should be enough if you have a backup of that folder…

My 2 cents
Andy

1 Like

Hi Andy,

thank you for your help.

The reason for the different places was not clear to me. I just don’t want to mess something up. I’ll template this.

regards,
stefan

@schulzstefan

Hi

The last time I used Hylafax was on SME Server, very many years ago. We used a ZyXel modem, worked very well.
The modem fried after a storm with a major power outage - possible lightning hit…
After that, we changed to VoIP / VoIP-Fax and never had to use Hylafax again.

The ZyXel serial modems were just too expensive, and finding a serial card isn’t easy either, servers don’t come with a serial port for several years now…

My 2 cents
Andy

PS: Using the template method you still always have the “original” files, and your mods stay permanent. Best of both worlds… :slight_smile:

Blockquote

Copy over the following:

/etc/e-smith/templates/etc/hylafax/hyla.conf → /etc/e-smith/templates-custom/etc/hylafax/hyla.conf
/etc/e-smith/templates/var/spool/hylafax/etc/ → /etc/e-smith/templates-custom/var/spool/hylafax/etc/

Make your customizations in the templates-custom versions, expand your template (Still the same command as in SME…):

expand-template /etc/hylafax/hyla.conf
expand-template /var/spool/hylafax/etc/

Blockquote

Let’s assume I want to template in FaxDispatch the SendTo.

ls /etc/e-smith/templates/var/spool/hylafax/etc/FaxDispatch shows

10base
20scripts and template-begin

less 10base

{

my $sendTo = $hylafax{‘SendTo’} || ‘root’;
my $fileType = $hylafax{‘DispatchFileType’} || ‘’;
$fileType =~ s/,/\ /g;
my $notifyMaster = $hylafax{‘NotifyMaster’} || ‘never’;
my $lang = $hylafax{‘Lang’} || ‘’;

$OUT.=“SENDTO=$sendTo\n”;
$OUT.=“FILETYPE="$fileType"\n”;
$OUT.=“NOTIFY_FAXMASTER=$notifyMaster\n”;
$OUT.=“LANG=$lang\n”;

}

shows for sendTo → root.

I copied the tree to custom-templates. I run a expand-template /var/spool/hylafax/etc/FaxDispatch

systemctl restart hfaxq

config show hylafax brings up:
-snip
SendTo=telefax@XXX.de
-snip

In /var/lib/nethserver/db/configuration is


telefax@XXX.de

I don’t get it. Something’s wrong.

edit 1:

What’s in /etc/e-smith/templates/var/spool/hylafax/etc/config.nethesis? Can’t see FaxDispatch…

and

in /etc/e-smith/events/nethserver-hylafax-save/update?

In /etc/e-smith/events/actions there’s more from hylafax.

Sorry, I’m not a dev or programmer, I’d just like to keep my settings over the next re-configure of the server.

edit 2: for my running fax on the NS I transferred from the SME with config show hylafax on the SME to the NS with config setprop the missing values. Maybe the info helps.

New updates are rushing in:

nethserver-cockpit noarch 1.7.21-1.ns7 nethserver-updates 2.7 M
nethserver-cockpit-lib noarch 1.7.21-1.ns7 nethserver-updates 44 k
nethserver-mail-common noarch 2.29.6-1.ns7 nethserver-updates 1.5 M
nethserver-mail-filter noarch 2.29.6-1.ns7 nethserver-updates 91 k
nethserver-mail-server noarch 2.29.6-1.ns7 nethserver-updates 131 k
nethserver-mail-smarthost noarch 2.29.6-1.ns7 nethserver-updates 58 k

What do I have to do, to keep at least my customized config for nethserver-hylafax?

Last time hylafax went to death…

Hi

Sorry I could not reply earlier, but you could - as in SME Server simply remark unneeded stuff, and put in more or less verbatim what you want.

Here my example for snmpd, which has three template files.
I copied them over, and needed changes in file 20., and everything deactivated in 30-…

ls /etc/e-smith/templates-custom/etc/snmp/snmpd.conf/

10base 20community 30acl

20 now looks like this:

#
# 20community
#
rocommunity public

30 now looks like this:

#
# 30acl
#
# group   MyROGroup   v2c         readonly
# view    all         included    .1
# access MyROGroup ""      any       noauth    exact  all    none   none

I didn’t need any changes in 10…

After expanding with

expand-template /etc/snmp/snmpd.conf

I get exactly what I need…

To be absolutely correct, I should remove the 10 file, as that’s is any unchanged original template, it get’s propagated as expected.

My 2 cents
Andy

Good evening Andy and thank’s for taking time for my question.

Don’t get me wrong, but I assume you’re not the maintainer of nethserver-hylafax.

Simple question - how can a customized configuration of nethserver-hylafax survive a reconfiguration while/after updating the server.

IMVHO it’s very clear that hylafax is (nearly) always customized. Maybe I missed something. Maybe anyone who’s running nethserver-hylafax with a modem tells me, that there’s no problem with keeping a customized config during/after updates. In this case I’d believe it depends on the migration. Would be nice to get a solution anyway. In any other case it’s a bug.

To whom it ever may concern.

1 Like

Using one physical modem (serial or usb) there’s no need to customize anything.
If you have specific questions about nethserver-hylafax I’ll gladly answer.

@filippo_carletti

Thank you for joining in.

Here’s the story:

I migrated the SME to NS with the migrating script. I followed the nethserver-hylafax how-to (https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-hylafax.html). The neth-addmodem wrapper did not work. I configured hylafax from scratch. Modem was working. Updates were rushing in. Modem went dead. I re-configured again from scratch, Modem is online again.

All I find in related hylafax-templates are standards (e.g. 39 as country code, ttys0 for port, etc.) values.

Right now there are updates pending. Will the hylafax config survive after issuing?

Forgot this to mention:

Now I think I understand.
Go to Software Center and install the old server manager.
The UI for hylafax has not been ported to the new cockpit server-manager, nobody is using it these days.
Once you install the old NethGUI, the application link will work and you will find the user interface to configure the fax server and the modem.
BTW, you can always use the command line, as in SME.

I’m showing you my configuration:

[root@nethservice ~]# config show hylafax
hylafax=configuration
    AreaCode=0721
    AreaNumber=
    ClientShowReceived=enabled
    CountryCode=39
    DateFormat=DMY
    Debug=enabled
    DispatchFileType=pdf
    FaxDevice=ttyIAX350
    FaxName=nethesis
    FaxNumber=266666
    InternationalPrefix=00
    Lang=it_IT
    LongDistance=0
    Mail2Fax=enabled
    Mode=both
    NotifyFileType=pdf
    NotifyMaster=never
    PBXPrefix=
    PaperSize=A4
    PrintReceived=disabled
    PrinterDriver=ljet4
    PrinterName=multifunzione
    Resolution=196
    RingsBeforeAnswer=1
    SambaFax=enabled
    SambaFaxName=SambaFax
    SendReport=disabled
    SendTo=faxmaster@nethesis.it
    SummaryReport=enabled
    WaitDialTone=disabled
    status=enabled

And a screenshot of the old UI:
Screenshot from 2021-01-14 12-36-33

2 Likes

Thank’s for pointing me in this direction. I’ll try asap.

But does this mean, that the new cockpit server-manager isn’t stable? I mean is it better to stay with the old server manager? I don’t care at all - I just would like to work with a stable distro/release.

it means we won’t backport new feature to the old server manager and we only push security fixes

Bye bye Nethgui, you were an old good friend

I installed the old server-manager, here’s the result of entering the areacode:

Event: nethserver-hylafax-save
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /etc/hylafax/hyla.conf
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /etc/pam.d/hylafax
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /etc/sysconfig/hylafax+
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/FaxDispatch
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/FaxNotify
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/FaxWedged
Jan 14 15:57:20 saturn esmith::event[54075]: ERROR: Could not expand //var/spool/hylafax/etc/FaxWedged template - it is a directory
Jan 14 15:57:20 saturn esmith::event[54075]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Jan 14 15:57:20 saturn esmith::event[54075]: [WARNING] expansion of /var/spool/hylafax/etc/FaxWedged failed
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/config
Jan 14 15:57:20 saturn esmith::event[54075]: ERROR: Could not expand //var/spool/hylafax/etc/config template - it is a directory
Jan 14 15:57:20 saturn esmith::event[54075]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Jan 14 15:57:20 saturn esmith::event[54075]: [WARNING] expansion of /var/spool/hylafax/etc/config failed
Jan 14 15:57:20 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/config.nethesis
Jan 14 15:57:21 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/hosts.hfaxd
Jan 14 15:57:21 saturn esmith::event[54075]: expanding /var/spool/hylafax/etc/dispatch/print.conf
Jan 14 15:57:21 saturn esmith::event[54075]: ERROR: Could not expand //var/spool/hylafax/etc/dispatch/print.conf template - it is a directory
Jan 14 15:57:21 saturn esmith::event[54075]: at /etc/e-smith/events/actions/generic_template_expand line 64.
Jan 14 15:57:21 saturn esmith::event[54075]: [WARNING] expansion of /var/spool/hylafax/etc/dispatch/print.conf failed
Jan 14 15:57:21 saturn esmith::event[54075]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.247786]
Jan 14 15:57:26 saturn FaxGetty[46963]: ANSWER: Can not lock modem device
Jan 14 15:57:55 saturn systemd: Stopping faxgetty on /dev/ttyS3…
Jan 14 15:57:55 saturn FaxGetty[46963]: CAUGHT SIGNAL 15
Jan 14 15:57:55 saturn FaxGetty[46963]: CLOSE /dev/ttyS3
Jan 14 15:57:55 saturn systemd: Stopped faxgetty on /dev/ttyS3.
Jan 14 15:57:55 saturn systemd: Reloading.
Jan 14 15:57:55 saturn systemd: [/usr/lib/systemd/system/netdata.service:72] Unknown lvalue ‘ProtectControlGroups’ in section ‘Service’
Jan 14 15:57:55 saturn systemd: firebird-superserver.service: Supervising process 38997 which is not our child. We’ll most likely not notice when it exits.
Jan 14 15:57:55 saturn systemd: Reloading.
Jan 14 15:57:55 saturn systemd: [/usr/lib/systemd/system/netdata.service:72] Unknown lvalue ‘ProtectControlGroups’ in section ‘Service’
Jan 14 15:57:55 saturn systemd: firebird-superserver.service: Supervising process 38997 which is not our child. We’ll most likely not notice when it exits.
Jan 14 15:57:55 saturn systemd: Started faxgetty on /dev/ttyS3.
Jan 14 15:57:55 saturn FaxGetty[54466]: OPEN /dev/ttyS3 HylaFAX ™ Version 7.0.3
Jan 14 15:57:55 saturn esmith::event[54075]: Action: /etc/e-smith/events/nethserver-hylafax-save/S20nethserver-hylafax-modemsetup SUCCESS [34.282248]
Jan 14 15:57:55 saturn esmith::event[54075]: lpadmin: The printer or class does not exist.
Jan 14 15:57:55 saturn esmith::event[54075]: Action: /etc/e-smith/events/nethserver-hylafax-save/S20nethserver-hylafax-sambafax SUCCESS [0.128917]
Jan 14 15:57:55 saturn esmith::event[54075]: Action: /etc/e-smith/events/nethserver-hylafax-save/S20nethserver-mail-postmap-update SUCCESS [0.475754]
Jan 14 15:57:56 saturn systemd: Reloading.
Jan 14 15:57:56 saturn systemd: [/usr/lib/systemd/system/netdata.service:72] Unknown lvalue ‘ProtectControlGroups’ in section ‘Service’
Jan 14 15:57:56 saturn systemd: firebird-superserver.service: Supervising process 38997 which is not our child. We’ll most likely not notice when it exits.
Jan 14 15:57:56 saturn systemd: Started HylaFAX faxq (job scheduler service).
Jan 14 15:57:56 saturn FaxQueuer[54502]: HylaFAX ™ Version 7.0.3
Jan 14 15:57:56 saturn FaxQueuer[54502]: Copyright © 1990-1996 Sam Leffler
Jan 14 15:57:56 saturn FaxQueuer[54502]: Copyright © 1991-1996 Silicon Graphics, Inc.
Jan 14 15:57:56 saturn FaxQueuer[54502]: HylaClient::send: client/50298: Cannot open FIFO: No such device or address
Jan 14 15:57:56 saturn esmith::event[54075]: [INFO] hylafax-faxq has been started
Jan 14 15:57:56 saturn systemd: Reloading.
Jan 14 15:57:56 saturn systemd: [/usr/lib/systemd/system/netdata.service:72] Unknown lvalue ‘ProtectControlGroups’ in section ‘Service’
Jan 14 15:57:56 saturn systemd: firebird-superserver.service: Supervising process 38997 which is not our child. We’ll most likely not notice when it exits.
Jan 14 15:57:56 saturn systemd: Started HylaFAX hfaxd (client service).
Jan 14 15:57:56 saturn HylaFAX[54530]: Listening to 0.0.0.0:4559
Jan 14 15:57:56 saturn HylaFAX[54530]: HylaFAX INET Protocol Server: restarted.
Jan 14 15:57:56 saturn esmith::event[54075]: [INFO] hylafax-hfaxd has been started
Jan 14 15:57:56 saturn esmith::event[54075]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.514908]
Jan 14 15:57:56 saturn esmith::event[54075]: Event: nethserver-hylafax-save FAILED
Jan 14 15:58:03 saturn FaxGetty[54466]: USR/3COM modem: disable Class 2.0
Jan 14 15:58:11 saturn FaxGetty[54466]: MODEM U.S. ROBOTICS V90/U.S. Robotics 56K FAX EXT V1.915M

This might be the reason: Event: nethserver-hylafax-save FAILED
and
HylaClient::send: client/50298: Cannot open FIFO: No such device or address

FIFO was there before…

Where/how to investigate?

edit:

in the server-manager:

Task completed with errors

Template /var/spool/hylafax/etc/FaxWedged #11 (exit status 1)
expansion of /var/spool/hylafax/etc/FaxWedged failed
Template /var/spool/hylafax/etc/config #12 (exit status 1)
expansion of /var/spool/hylafax/etc/config failed
Template /var/spool/hylafax/etc/dispatch/print.conf #15 (exit status 1)
expansion of /var/spool/hylafax/etc/dispatch/print.conf failed

You have to fix the “damages” you did. :slight_smile:
It seems that you deleted some files replacing them with directories.

Please show the output of rpm -V hylafax+.

rpm -V hylafax+
S.5…T. c /etc/sysconfig/hylafax+
S.5…T. c /var/spool/hylafax/etc/hosts.hfaxd
SM5…T. c /var/spool/hylafax/etc/xferfaxlog

If so, not intensionally :slightly_frowning_face:

1 Like

It would be no problem to clean everything up and re-install. If you recommend.