Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 10.04 - Hylafax w/ Avantfax install guide

  1. #1
    Join Date
    Jul 2007
    Location
    Minneapolis, Minnesota
    Beans
    56
    Distro
    Ubuntu 10.04 Lucid Lynx

    10.04 - Hylafax w/ Avantfax install guide

    Disclosure: This is not an official guide by any means. This is just what I use to build Hyalfax/AvantFax boxes for the company that I work for. It was initially put together by a co-worker and myself, and I edit it as needed. This is how it works for us, I hope it works for you

    What is Hylafax/AvantFax? - Hylafax is an application that can be used to do all sorts of things with faxing on Linux. AvantFax is another application that sits "on top" of Hylafax and adds a website for administering faxes.

    We currently use it for the following: 1) Receiving faxes that contain orders for our company and then emailing those faxes to a specific inbox or having users log into the AvantFax page for their server and manage the faxes as needed there. 2) Installing a Hylafax client to send faxes from user's desktops using the modems on the Hylafax server. I'm sure other people can use it for other means, but this is specifically what we use it for.

    Why 10.04 instead of 12.04? - Because I haven't verified everything on 12.04 yet, but it's coming

    Introduction: (Straight from the website)
    HylaFAX:
    HylaFAX is an enterprise-class system for sending and receiving facsimiles as well as for sending alpha-numeric pages. The software is designed around a client-server architecture. Fax modems may reside on a single machine on a network and clients can submit an outbound job from any other machine on the network. Client software is designed to be lightweight and easy to port. HylaFAX is designed to be very robust and reliable. The fax server is designed to guard against unexpected failures in the software, in the configuration, in the hardware and in general use. HylaFAX can support multiple modems and a heavy traffic load. Not to mention, it's also Open Source, so if you're going to install a modem or create a new Hylafax server, you'll need to be prepared for some Linux command line use.

    Administering HylaFAX with AvantFAX:
    AvantFAX is another piece of software that is Open Source and will run on the same server as the HylaFAX server. It helps by creating a web site that showcases the faxing that's done through this server and can help if anything breaks or if reports need to be generated.

    Setting Up a New Server
    Assumptions: This was tested with the Ubuntu 10.04 and the Ubuntu build of the Hylafax package. The Ubuntu server was already setup with only SSH, updated, and would now be ready to go.

    Make sure static IP is set to something:

    Code:
    #pico /etc/network/inferfaces
    
    auto eth0
    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
    network 192.168.1.0
    broadcast 192.168.1.255
    
    dns-nameservers <IPs of local DNS servers>
    dns-search <domain name>
    dns-domain <domain name>
    1) Install HylaFAX:

    Code:
    # sudo apt-get install hylafax-server hylafax-client
    a) During the installs that happen at this stage, there will be a couple of pop-ups asking for information. Please use the following in this order for answers:
    Which type of setup: Internet with smarthost
    System mail name: <FQDN of your server>
    SMTP relay host: <your relay server>

    a) Configure the software:

    Code:
    # sudo faxsetup
    a) Choose all defaults until it asks you if you want to setup a modem. Once you get to the point where setup is asking you if you want to run faxaddmodem to configure a modem, choose NO. You will add modems later and possibly once you're on site.

    2) Install AvantFax:

    Either download the software from AvantFax's website (http://www.avantfax.com/) or wherever you store it after the download. We have it stored on a network share, so it's SSH'd into the /home/user directory.

    a) Move the software to where you'd like it to reside and untar it
    Code:
    # sudo mv /home/user/avantfax-3.3.3.tgz /opt
    # sudo cd /opt
    # sudo tar -xvzf avantfax-3.3.3.tgz
    b) Move AvantFAX folder to /var/www
    Code:
    # sudo mv avantfax-<version number>/ /var/www
    c) Run the install script (only ever run this script ONE TIME!!)
    Code:
    # sudo cd /var/www
    # sudo ./debian-install.sh
    1) Set MySQL password to whatever you want, but remember it for the next step

    d) Create AvantFAX DB
    **NOTICE** - I'm currently setting up the database with the default avantfax user's password. Please change if you don't want people to know the database password.
    Code:
    # mysql -uroot -p < create_user.sql
    # mysql -uavantfax -pd58fe49 avantfax < create_tables.sql
    e) Change AvantFax log location
    Code:
    # sudo cd /etc/apache2/sites-available
    # pico default
    
    <VirtualHost *:80>
     DocumentRoot /var/www/avantfax
    # ServerName avantfax
     ErrorLog /var/log/apache2/avantfax-error_log
     CustomLog /var/log/apache2/avantfax-access_log common
    </VirtualHost>
    f) Restart Apache
    Code:
    # sudo apache2ctl restart
    g) Open browser to http://<IP of your HylaFAX server>/avantfax/admin to verify AvantFax works
    1) Username: admin Password: password
    2) Change password to be whatever you desire

    3) Change the following file to have 127.0.0.1 in it so faxstat works correctly and modem status shows up correctly in AvantFAX:

    Code:
    # sudo pico /etc/hylafax/hosts.hfaxd
    
    127.0.0.1
    4) To ensure that AvantFax can show faxes in the Inbox and send emails:

    Code:
    # sudo mv /var/spool/hylafax/bin/faxrcvd faxrcvd_hylafax
    # sudo mv /var/spool/hylafax/bin/faxrcvd.php faxrcvd
    5) Restart Hylafax

    Code:
    # sudo /etc/init.d/hylafax restart
    If you're going to use a system with multiple modems attached to it, know the following: If they're external USB modems, every system reboot they have a possibility to change their location (ttyACM0 could become ttyACM1), so in order to get around this, I setup udev (http://linux.die.net/man/8/udev) rules to make them
    stay static. I couldn't use the serial numbers (even though I've found modems with unique serial numbers, udevadm can't see them). Therefore, I would create a new "rules" file and add rules like the following:

    pico /etc/udev/rules/75-presistent-modems.rules

    # Line X - Modem01 This is a comment line.
    SUBSYSTEMS=="usb", KERNELS=="3-4.3:1.0", SYMLINK+="Modem01"


    Sources/Extra Info:
    Project Web Pages:
    HylaFAX: http://www.hylafax.org/content/Main_Page
    AvantFAX: http://www.avantfax.com/

    Useful Commands:
    Code:
    # watch faxstat
    Refreshes "faxstat" every 2 seconds to give a snapshot of what modems have been setup for Hylafax and what their current status is.

    Common Errors:
    Issue - Modem says "Waiting for modem to come free" when you run faxstat and faxes aren't coming in
    Fix - Restart the Hylafax service by running:
    Code:
    # sudo /etc/init.d/hylafax restart
    How to reset a modem if it gets stuck:
    Code:
    Minicom -s
    Atz
    Atdt<number to call>
    
    Ctrl-a,q

    Congratulations, you should now have a working HylaFAX w/ AvantFAX box ready for use! After this, we do some extra setups for administrating these boxes (we currently have ~10 HylaFAX servers). If there is a demand to have me write up any of the following, please let me know! Also, if you have any critiques, questions, or concerns about this guide, please don't hesitate to PM me!

    1) Scripted Failed Faxes Report - My co-worker created a way to use Mercurial to send out and update a script that's run daily through Crontab to email us which faxes failed, the reasons why, and how many failed per modem.
    2) Install SNMP to use Dell OMSA and Nagios to monitor the server hardware
    Last edited by jumping_snake; August 29th, 2012 at 04:54 PM.

  2. #2
    Join Date
    Jul 2007
    Location
    Minneapolis, Minnesota
    Beans
    56
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04 - Hylafax w/ Avantfax install guide

    So I'm apparently a forum noob and can't edit my post, but thanks to Jahape4 for showing me an issue in my guide! Below is what I have in there:
    Code:
    # sudo mv /var/spool/hylafax/bin/faxrcvd faxrcvd_hylafax
    # sudo mv /var/spool/hylafax/bin/faxrcvd.php faxrcvd
    To be specific, it should actually be the following:

    Code:
    # sudo mv /var/spool/hylafax/bin/faxrcvd /var/spool/hylafax/bin/faxrcvd_hylafax
    # sudo mv /var/spool/hylafax/bin/faxrcvd.php /var/spool/hylafax/bin/faxrcvd
    We're renaming the files in place. My previous commands renamed them and moved the files to whatever directory the user was currently in. My bad

  3. #3
    Join Date
    Oct 2011
    Beans
    5

    Re: 10.04 - Hylafax w/ Avantfax install guide

    So I took a stab at installing on 11.10 & installation went very smoothly.
    Thanks for the nice instructions!

    After a couple of hiccups I got the interface working & users set up.
    Sending faxes works very well & log gets properly updated, email
    notification works too.

    Avantfax was installed over a previously functioning standalone Hylafax server
    used for receiving only, and both printed faxes & emailed pdfs.

    The Avantfax faxrcvd script though failed with the messahe below and also
    never printed or emailed eiither the fax or confirmation, and the log was
    not updated.

    24.04.2013 16:25 faxrcvd> failed: recvq/seqf ttyS4 corrupted
    24.04.2013 16:25 faxinfo> XDEBUG CHECK sender '' in faxfile 'recvq/seqf'
    24.04.2013 16:25 faxrcvd> Failed to copy recvq/fax000004859.tif to /var/www/avantfax/faxes/recvd/2013/04/24/XXXXXXX/000004859/fax.tif
    24.04.2013 16:25 mkdirs> Error creating directory /var/www/avantfax/faxes/recvd
    24.04.2013 16:25 faxrcvd> PROCESSING FAX from 'XXXXXXX' (1 pages) received '2013:04:24 16:09:32'
    24.04.2013 16:25 faxrcvd> executing: recvq/fax000004859.tif ttyS4 '' '' CIDNum: '' CIDName: '' DID: ''
    24.04.2013 16:25 faxinfo> XDEBUG CHECK sender '' in faxfile 'recvq/fax000004859.tif'


    There seem to be permission errors in creating directories under /var/ww/avantfax/faxes, but
    they are not obvious to me.....

    drwxrwxr-x 11 www-data www-data 4096 2010-09-01 16:03 avantfax
    ..
    drwxrwx--- 3 www-data uucp 4096 2013-04-24 11:10 recvd
    drwxrwx--- 3 www-data uucp 4096 2013-04-24 12:04 sent

    Any help would be appreciated

    thanks
    George Kampouris

  4. #4
    Join Date
    Dec 2012
    Beans
    4

    Re: 10.04 - Hylafax w/ Avantfax install guide

    24.04.2013 16:25 mkdirs> Error creating directory /var/www/avantfax/faxes/recvd

    That error looks as if the 'recvd' folder doesn't even exist at that location...Have you verified if it truly is was created at that location and has correct permissions?

  5. #5
    Join Date
    Oct 2011
    Beans
    5

    Re: 10.04 - Hylafax w/ Avantfax install guide

    Sorry its been so long to reply.

    I checked & the directory is there, though only accessible as root

    gk@fax:~$ sudo ls -l /var/www/avantfax/faxes
    total 8
    -rwxrwx--- 1 www-data uucp 0 2010-09-01 16:03 index.html
    drwxrwx--- 3 www-data uucp 4096 2013-04-24 11:10 recvd
    drwxrwx--- 3 www-data uucp 4096 2013-04-24 12:04 sent

    gk@fax:~$ sudo ls -l /var/www/avantfax/faxes/recvd
    total 4
    drwxrwxrwx 6 uucp uucp 4096 2013-04-24 12:44 2013
    -rwxrwx--- 1 www-data uucp 0 2010-09-01 16:03 index.html


  6. #6
    Join Date
    Dec 2012
    Beans
    4

    Re: 10.04 - Hylafax w/ Avantfax install guide

    No problem...Yeah my directories has the same permissions/owners/etc as you...

    However,I just realized this line in your original error: 24.04.2013 16:25 faxrcvd> failed: recvq/seqf ttyS4 corrupted

    What do you get if you run the watch faxstat command?

    I'm wondering too if you just need to reconfigure your modem through faxsetup and verify it's correct.

    One glitch I also ran into was I needed to change the following entries when running through faxaddmodem (though this may not have anything to do with your issue) to get sending working properly.


    • Protection mode for received facsimile [0600]? I set to 0644
    • Protection mode for session logs [0600]? I set to 0644
    • Protection mode for ttyS0 [0600]? I set to 0666

  7. #7
    Join Date
    Oct 2011
    Beans
    5

    Re: 10.04 - Hylafax w/ Avantfax install guide

    Watch faxstat returns:

    HylaFAX scheduler on fax: Running
    Modem ttyS4 (+): Running and idle

    By the way, the script to copy older incoming faxes from the Hylafax directory worked just fine & they're all in the 2013 subdir of .../recvd.

    Also, it is quite strange that have no such issue with outgoing faxes. Notifications are emailed & the log properly updated......

  8. #8
    Join Date
    Dec 2012
    Beans
    4

    Re: 10.04 - Hylafax w/ Avantfax install guide

    What are the permissions of /var/www/avantfax/tmp?

    Only reason I ask is because of this thread which has a very similar error as yours...and was resolved by using the first step of the Avantfax install guide, here.

    Below is the snippet of the first step, which mainly has you moving your avantfax folder but the fix seemed to come from then setting the correct permissions to specific folders.

    chmod -R 0770 /var/www/avantfax/tmp /var/www/avantfax/faxes
    chown -R apache.uucp /var/www/avantfax/tmp /var/www/avantfax/faxes

  9. #9
    Join Date
    Oct 2011
    Beans
    5

    Re: 10.04 - Hylafax w/ Avantfax install guide

    drwxrwx--- 1320 www-data uucp 36864 2013-04-29 11:11 tmp

  10. #10
    Join Date
    Dec 2012
    Beans
    4

    Re: 10.04 - Hylafax w/ Avantfax install guide

    Just sent you a PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •