Koozali.org: home of the SME Server

Hylafax Re-visited Yet Again

Offline cbacani

  • *
  • 111
  • +0/-0
Question
« Reply #45 on: February 21, 2007, 09:52:01 PM »
Quote from: "snoble"
an email using the .fax domain uses the faxsender account automatically
if your using test@5551212.fax and it doesn't work i have no other ideas


Could this be an issue that SME server sees an email being sent from a web page as a 'outside' attempt to by-pass security? Would you have to log in with name and password to send from a specific account?

Maybe Iam going about this the wrong way. How else could you send form information to Hylafax and have Hylafax fax it?

Lost

goltuna

Re: Step-by-Step that worked for me.
« Reply #46 on: March 07, 2007, 12:55:22 AM »
Quote from: "cbacani"
Quote from: "cbacani"
All,

Forgot the instructions on the mailfax script, after that the system responded very well. I will do a clean install tomorrow and see what I get.

Thanks to ALL and I mean all of ya! You are the best!

Carl


I tested this 3 times with a clean install.

Hylafax on the SME Server                     1/29/07

These instructions will install Hylfax on the SME Server version 7.1 as of 1/29/07.

The system will send a fax and e-mail the faxuser.

Download the most current version from here and place the file in the /usr/sbin folder.

# cd /usr/sbin

# wget ftp://ftp.hylafax.org/binary/linux/redhat/RPMS/i386/hylafax-4.3.1-1rhel4.i386.rpm

Install via the following command and it will install all of the required packages for you.

# yum --enablerepo=base --enablerepo=updates localinstall hylafax-4.3.1-1rhel4.i386.rpm

Make sure that your modem is plugged into the serial port and turned on.

After the install, the system will ask you to reboot the system, then run the

# /usr/sbin/faxsetup command and answer the questions as required.

NOTE: When I answered the questions, I accepted the defaults on most everything except
the area code and telephone number of the fax line.
 
Take note of your modems tty and substitute within the inittab template to suit your setup. My modem is on ttyS0. (The first serial port is ttyS0 and the second is ttyS1) Internal Modems most likely will not work.


Run the following commands. Watch out for line wrapping.

# mkdir -p /etc/e-smith/templates-custom/etc/inittab
# cd /etc/e-smith/templates-custom/etc/inittab
# echo 'fax:23457:respawn:/usr/sbin/faxgetty ttyS0' >> 85hylafax
# /sbin/e-smith/expand-template /etc/inittab
# ln -s /etc/rc.d/init.d/hylafax /etc/rc.d/rc7.d/S95hylafax
# signal-event post-upgrade; signal-event reboot


Setting up SME-Server using the server manager

Open your server-manager.

Create a new user account using the following data:

Account Name:      faxuser

First Name:      fax

Last Name:      fax

E-Mail Delivery:   Deliver e-mail locally

Forwarding Address:   Leave Blank

Reset Password   <9Gh08pV5O;


Create a new virtual domain:

Domain Name:      fax

Brief Description:   fax

Content:      Primary Web Site

Domain DNS Servers   Resolve Locally

*************************************************************

Changing SME-Server configuration

Next step is to redirect all mail for the domain .fax to the user faxuser.
We can do this by creating a custom template file in the appropriate folder.

Create the folder (if it doesn’t already exist).
# mkdir -p /etc/e-smith/templates-custom/var/qmail/control/virtualdomains

Create the custom template file.
# pico /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/95faxmail

In this 95faxmail file we will enter the virtual domain, and connect it to the faxuser.
The only line in this file will look like this:
.fax:faxuser

Redirect mail for faxuser to mailfax script.
We will create a new file that tells qmail to pipe all mail to the (to be created) mailfax script.

In the users home directory /home/e-smith/files/users/faxuser. We create and edit the file
named .qmail-default:

# pico /home/e-smith/files/users/faxuser/.qmail-default

Containing only one line
| /etc/hylafax/etc/mailfax


Set the ownership and rights on .qmail-default to the user only:

# chown faxuser:faxuser /home/e-smith/files/users/faxuser/.qmail-default
# chmod 644 /home/e-smith/files/users/faxuser/.qmail-default

Restart the qmail Server.
First we'll have to rebuild the configuration files. Then we can restart qmail.

Rebuild the SME-Server configuration files by executing:
# /sbin/e-smith/signal-event console-save

This can take awhile, after that we restart qmail:
# service qmail restart

Creating the mailfax script

# pico /etc/hylafax/etc/mailfax

This file must contain:

#!/bin/sh
#
# mailfax - email to fax gateway for qmail.
#
# Original file from HylaFAX, updated for e-smith server.
#----------------------------------------------------------
# 4 more information see: http://www.vangee.nl/sme/hylafax
#
# 1.) Install HylaFAX
# 2.) In server-manager add a virtual domain named: fax
# 3.) In server-manager add a user named: faxuser
# 4.) Install this file as: /etc/hylafax/etc/mailfax
# 5.) Add the following file to your system:
#     /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases
# 6.) Put this line in the file:
#     .fax:faxuser
# 7.) Add the following file to your system:
#     /home/e-smith/files/users/faxuser/.qmail-default
# 8.) Put this line in the file:
#     | /etc/hylafax/etc/mailfax
# 9.) Execute: /sbin/e-smith/signal-event console-save
# 10) Execute: service qmail restart
 
TMPVAR=${SENDER//\`/}
TMPVAR=${TMPVAR//\$\(/}
SENDER=${TMPVAR//\)/}

/usr/bin/faxmail -f Helvetica-Bold | /usr/bin/sendfax \
        -f "$SENDER" \
        -n -d "$EXT2@`/usr/bin/expr \"$HOST\" : '\(.*\)\.fax$'`"

Change the ownership and rights for the mailfax script:
# chown root:root /etc/hylafax/etc/mailfax
# chmod 755 /etc/hylafax/etc/mailfax
Add the following file to your system:


Receiving faxes by e-mail

We can also route all incoming faxes to the faxuser's e-mail box. To do this we must create a new
HylaFAX configuration file. It is possible to receive the incoming faxes in one of three formats. (.ps .pdf or .tif)

# pico /var/spool/hylafax/etc/FaxDispatch

This file must contain:

FILETYPE=pdf;
SENDTO=faxuser;

Substitute tif or ps for pdf as you desire.

+++++++++++++++++++++++++++++++++++++++++++++++

Hylafax e-mail to Fax Gateway

One of the main uses for Hylafax is as an e-mail to fax gateway. This gateway unifies a users
communications, so that faxing is as simple as using an e-mail client. The user can e-mail
john@08812345678.fax and know that the message typed, and any attachment will be faxed via Hylafax.

To setup an e-mail to fax gateway using hylafax, a few simple scripts are needed to convert attachments into postscript so that hylafax can then use them. You can send e-mails with pdf attachments, postscript attachments or tiff attachments. By default, hylafax will not decode any attachments, so you need to edit

Run the following commands.

# pico /etc/hylafax/hyla.conf
# This line tells hylafax(faxmail) to decode attachments using scripts
# located here.
MIMEConverters: /var/spool/hylafax/mimetype
#

Create the mimetype directory, then inside that, a directory for the attachment mime type, eg application or image, then create a script inside that. The script is passed $1 as the decoded attachments filename, and hylafax expects postscript on standard out. The tree looks like this

# cd /var/spool/hylafax
# mkdir /var/spool/hylafax/mimetype
# mkdir /var/spool/hylafax/mimetype/application          pdf  file goes here     ps  file goes here  
# mkdir /var/spool/hylafax/mimetype/image        tiff   file goes here

+++++++++++++++++++++++++++++++++++++++++++++++

For PDF attachments:

cd /var/spool/hylafax/mimetype/application      

pico pdf

Insert this code below in the pdf file;

#!/bin/sh
#/application/pdf
# convert PDF attachment to Postscript for Hylafax to send
pdf2ps $1 –

Save the file.

# chmod +x pdf

For PS attachments:

pico ps

Insert this code below in the ps file;

#!/bin/sh
#/application/ps
# convert PS attachment to Postscript for Hylafax to send
echo $1

Save the file.

# chmod +x ps


For TIF attachments:

cd /var/spool/hylafax/mimetype/image/

pico tif

Insert this code below in the tif file;

#!/bin/sh
#/image/tif
# convert TIF attachment to Postscript for Hylafax to send
/usr/bin/tiff2ps $1

Save the file.

# chmod +x tif

(make sure to chmod +x them to make them executable).

# signal-event post-upgrade; signal-event reboot



Testing

Send an e-mail from your favorite mailing software to the SME-Server. This means that the smtp server in your e-mail software must be set to the SME-Server. Because the e-mail address we are going to be using will only be known by our server. Then we will send an e-mail with the following recepeint: Name@FaxNumber.fax


e.g: John_Smith@5555551212.fax

+ The name can be any name.
+ The fax number is going to be used for faxing the document.
+ Mail can only be send as a plain text e-mail.
+ Mail can have a postscript attachment, this attachment will also be faxed. (filename.ps)
   So don't expect your html formatted e-mails to be faxed! Sorry!

goltuna

Re: Step-by-Step that worked for me.
« Reply #47 on: March 07, 2007, 01:11:34 AM »
Bonsoir,
could you pls be so kind to tell me what to do with @.qmail-default which is all ready existing when we create the user "faxuser"
Can we add the line:| /etc/hylafax/etc/mailfax to the others : "condredirect faxuser..." and how to save it. Or can we delete the file @.qmail-default without any problems.
Tks.
Goltuna

jazbokes

Hylafax Re-visited Yet Again
« Reply #48 on: March 11, 2007, 11:29:22 PM »
Has anyone been successful in integrating web based faxing application on 7.1 with hylafax..

http://www.mentalbarcode.com/avantfax.php



Thanks

Jon..

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
I no nothing
« Reply #49 on: March 21, 2007, 02:23:37 AM »
Quote from: "cbacani"
I have a website that is on the same server as hylafax (SME 7.1)

The website has a form on it that needs to be faxed when it is completed.

How do I do this?

I thought it could be done by taking the form information and having
the form mailer simply send it to the test@5551212.fax address but this
does not work.

Any Ideas?

Carl


I don't know anything, about this, but from what I'm reading it appears the hyla fax is not meant to send html, but ps,pdf, or tiff, if setup properly.

So having said that I must ask is the web form that you are trying to send in a html format ? I mean to say that currently when the form is created is the output that gets sent to you via email, sent in text only or in html etc. ?

If so then perhaps the form needs to convert to a hylafax capable format in order to send to the a hyla1234567@.fax etc.  such as ps,pdf, or tiff.

But as I said I know nothing about this, but what I'm reading here

I hope this helps.

Offline cbacani

  • *
  • 111
  • +0/-0
Hylafax
« Reply #50 on: March 21, 2007, 03:26:28 AM »
Quote from: "jazbokes"
Has anyone been successful in integrating web based faxing application on 7.1 with hylafax..

http://www.mentalbarcode.com/avantfax.php

Thanks

Jon..


Hope this will shed a little light on this subject. No, hylafax will not SEND any HTML but it CAN receive graphics. I to am looking for a way to interface this to a web based interface but these install instructions might make the install a little bit easier.

See below for the new install instrucions.  Carl

P.S. Thanks Stephan

Hylafax on the SME Server for version 7.0 + 7.1.1 + 7.1.2
Dated March 13, 2007

1. Install
1.1. Install Hylafax
Download the latest rpm from
http://www.hylafax.org/content/Red_Hat_Packages

Install with the following command and it will install all of the required packages for you.                          

yum localinstall hylafax*

1.2. Configure modem
Make sure that your modem is plugged into the serial port and turned on.
/usr/sbin/faxsetup
Answer the questions as required.
Accept the defaults on most everything except
the county & area code and telephone number of the fax line.
Take note of your modems tty
(The first serial port is ttyS0 and the second is ttyS1)
Note. The inittab template assumes you are using ttyS0.
Internal Modems most likely will not work.

1.3. Install smeserver-hylafax
smeserver-hylafax configures SME Server to suit hylafax rpm available here, please add comments, success or failure, new fragments/features
http://bugs.contribs.org/show_bug.cgi?id=2457

yum localinstall smeserver-hylafax*
signal-event post-upgrade; signal-event reboot

a new user, 'faxmaster' is created, optionally,  forward the mail for faxmaster to suit, to a user or group a domain 'fax' and a user 'faxsender' is created to enable the email to fax gateway as well as other support scripts and changes

2. Usage

2.1. Receiving faxes by e-mail
All incoming faxes go to the faxmaster's e-mail box, or forwarded as you have configured

2.2. Sending faxes by e-mail
One of the main uses for hylafax is as an e-mail to fax gateway. This gateway unifies a users communications, so that faxing is as simple as using an e-mail client. The user can email john@08812345678.fax and know that the message typed, and any attachment willbe faxed via Hylafax.

To setup an e-mail to fax gateway using hylafax, a few simple scripts are needed to convert attachments into postscript so that hylafax can then use them. By default you can send e-mails with pdf attachments, postscript attachments or tiff attachments.

Testing
Send an e-mail from your favorite mailing software to the SME-Server. This means that the smtp server in your e-mail software must be set to the SME-Server. Because the e-mail address we are going to be using will only be known by our server. Then we will send an e-mail with the following recepeint: Name@FaxNumber.fax

e.g: John_Smith@5555551212.fax
+ The name can be any name.
+ The fax number is going to be used for faxing the document.
+ Mail can only be send as a plain text e-mail.
+ Mail can have a postscript, pdf or tiff attachment, this attachment will also be faxed.

Don't expect your html formatted e-mails to be faxed! Sorry!

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Thanks
« Reply #51 on: March 22, 2007, 02:46:11 PM »
I am concerned I might break something, but I'll follow the instructions and try it.

I'm not sure which instructions to follow the first long instruction or the second ? updated instruction as of March 07

Just want to be sure I won't break something.

Thanks

Offline cb-wizard

  • *
  • 31
  • +0/-0
Hylafax Re-visited Yet Again
« Reply #52 on: March 22, 2007, 04:00:57 PM »
Keep on getting the following error:


The tiffg3 driver is required for HylaFAX to operate correctly.

Consult the documentation for information on building Ghostscript

with the necessary TIFF driver and then rerun faxsetup when a new

Ghostscript has been installed


Tried the latest install.

What am I missing?
...

Offline cbacani

  • *
  • 111
  • +0/-0
Re: Thanks
« Reply #53 on: March 22, 2007, 04:34:01 PM »
Quote from: "Agent86"
I am concerned I might break something, but I'll follow the instructions and try it.

I'm not sure which instructions to follow the first long instruction or the second ? updated instruction as of March 07

Just want to be sure I won't break something.

Thanks


Both work ( the lomg and the short ) but the second install is the one that I have used on 9 computers and it takes no time and is the recommended way to perform the install. Nothing is in stone but it is the latest and I think the correct way to do it. The latest install method keeps the settings when you reboot and thus causes no issues.

Carl

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
Hylafax Re-visited Yet Again
« Reply #54 on: March 23, 2007, 12:39:05 AM »
cbacani

I uninstalled the old version of hylafx I had working on here.

Followd your instructions on this instalation.

Everything installed ok ... setup went fine ... I also sent a few test faxes out with oulook.

One thing that does not work any longer is my Frog FaxMail.

I added a user and password and updated the details in Frog FaxMail but it doesn't seem to want to connect.

There must be something I have over looked .... can you let me know how you got the client working or what client you are using.

Regards,

Tib

Offline cbacani

  • *
  • 111
  • +0/-0
Client
« Reply #55 on: March 23, 2007, 12:52:38 AM »
Quote from: "Tib"
cbacani

I uninstalled the old version of hylafx I had working on here.

Followd your instructions on this instalation.

Everything installed ok ... setup went fine ... I also sent a few test faxes out with oulook.

One thing that does not work any longer is my Frog FaxMail.

I added a user and password and updated the details in Frog FaxMail but it doesn't seem to want to connect.

There must be something I have over looked .... can you let me know how you got the client working or what client you are using.

Regards,

Tib


I am not using a client. But, I have read that people who do have to enter the name and password into the database on the server. Look at the old instructions and it says something like:

Login on your SME Server with putty and make a new faxuser:

faxadduser -p password username

Password is your Password and Username is your Username  
Now install the HylaFAX-Client and restart the Windows Computer.
After this, you start the HylaFAX-Client and insert your Values:

Server IP: Your SME Server IP
Port: 4559
Username: Your Username
Passord: Your Password

That's it! I think. Please let me know if this works. Thanks

I just fax from the program that Iam using and away it goes.   Carl

Offline cbacani

  • *
  • 111
  • +0/-0
Re: Client
« Reply #56 on: April 16, 2007, 02:17:12 PM »
HylaFAX clients
Download Client Software from:

http://www.hylafax.org/content/Client_Software
http://www.frogfax.com/modules/spxnews/
http://www.hylafax-client.de

Login on your SME Server with ssh and make new faxusers:

faxadduser -p password username
faxadduser -p password2 username2
Install the HylaFAX Client, configure with these values:

Server IP: Your SME Server IP
Port: 4559
Username: above username
Passord: above password

[edit] Other Modifications
ports other than ttyS0, eg

config setprop hylafax port ttyS1
/sbin/e-smith/expand-template /etc/inittab
/sbin/init q

--------------------------------------------------------------------------------

Change permissions and other settings in the config.MODEM file

nano -w /etc/hylafax/etc/config.ttyS0

# make attachments readable
RecvFileMode:           0666
LogFileMode:            0666
DeviceMode:             0666
# for shared lines
RingsBeforeAnswer:      10
# change to suit
SpeakerVolume:          on
LocalIdentifier:        "Pagen Vegan Pty Ltd"

emo82

hyla on 7.1
« Reply #57 on: April 18, 2007, 02:55:40 PM »
Hi everyone and thanks for your time!!!!

I have some problems with installing and getting started with hylafax on SMEserver 7.1.

1. wget ftp://chaloner.ca/hylafax-SME7.tar - ok
2. tar -xvf *.tar - ok
3. sh install-part-1.sh - ok
4. faxsetup......faxaddmodem..... - ok
5. sh install-part-1.sh - ok
6. signal-event post-upgrade; signal-event reboot - ok
7. make user faxmaster; ste password for faxmaster user - ok

Now I want to send fax by e-mail, and receve mail by fax. Is there something else I have done to make this working?

I am sorry for my bad english!!!!

emo@bgshos.net

Offline cbacani

  • *
  • 111
  • +0/-0
Re: hyla on 7.1
« Reply #58 on: April 18, 2007, 09:37:54 PM »
Quote from: "emo82"
Hi everyone and thanks for your time!!!!

I have some problems with installing and getting started with hylafax on SMEserver 7.1.

1. wget ftp://chaloner.ca/hylafax-SME7.tar - ok
2. tar -xvf *.tar - ok
3. sh install-part-1.sh - ok
4. faxsetup......faxaddmodem..... - ok
5. sh install-part-1.sh - ok
6. signal-event post-upgrade; signal-event reboot - ok
7. make user faxmaster; ste password for faxmaster user - ok

Now I want to send fax by e-mail, and receve mail by fax. Is there something else I have done to make this working?

I am sorry for my bad english!!!!

emo@bgshos.net


Install instructions for Hylafax on the SME Server version 7.1 as of 2/16/07

1.1. Install Hylafax
First we need to get the following files.
Download the latest files (rpm) from the following url
http://www.hylafax.org/content/Red_Hat_Packages

1.2. Download the following file:
# wget http://cbtest.us/smeserver-hylafax-0.9-3.noarch.rpm

1.3.
Install with the following command and it will install all of the required packages for you.
# yum localinstall hylafax*

1.4. Configure modem
Make sure that your modem is plugged into the serial port and turned on.
# /usr/sbin/faxsetup

Answer the questions as required. Accept the defaults on most everything except the county & area code and telephone
number of the fax line. Take note of your modems tty  (The first serial port is ttyS0 and the second is ttyS1)

Note. The inittab template assumes you are using ttyS0. This system may not work with internal modems.
http://www.hylafax.org/content/Main_Page may contain answers for internal modems.

1.5. Install smeserver-hylafax
# yum localinstall smeserver-hylafax*
# signal-event post-upgrade; signal-event reboot

a new user, 'faxmaster' is created optionally forward the mail for faxmaster to suit, to a user or group a domain 'fax'
and a user 'faxsender' is created to enable the email to fax gateway as well as other support scripts and changes.

# touch /var/spool/hylafax/etc/xferfaxlog

2.1. Receiving faxes by e-mail
All incoming faxes go to the faxmaster's e-mail box, or forwarded as you have configured.

2.2. Sending faxes by e-mail
One of the main uses for hylafax is as an e-mail to fax gateway. This gateway unifies a users communications, so that
faxing is as simple as using an e-mail client. The user can email john@08812345678.fax and know that the message typed,
and any attachment will be faxed via Hylafax.  To setup an e-mail to fax gateway using hylafax, a few simple scripts
are needed to convert attachments into postscript so that hylafax can then use them. By default you can send e-mails
with pdf attachments, postscript attachments or tiff attachments. Don't expect your html formatted
e-mails to be faxed! Sorry!

Testing
Send an e-mail from your favorite mailing software to the SME-Server. This means that the smtp server in your e-mail
software must be set to the SME-Server. Because the e-mail address we are going to be using will only be known by our
server. Then we will send an e-mail with the following recepeint:     Name@FaxNumber.fax    
e.g: John_Smith@5555551212.fax

+ The name can be any name.
+ The fax number is going to be used for faxing the document.
+ Mail can only be send as a plain text e-mail.
+ Mail can have a postscript, pdf or tiff attachment, this attachment will also be faxed.

2.3. Hylafax clients
Download Client Software from:
http://www.hylafax.org/content/Client_Software
http://www.frogfax.com/modules/spxnews/
http://www.hylafax-client.de


Setting up the email was where you may have made a mistake. Review the above and see where you may have gone wrong.

Carl

emo82

thanks!!!!
« Reply #59 on: April 19, 2007, 10:32:49 AM »
Thank you very much for your replay.

INIT: Id "fax" respawning too fast: disabled for 5 minutes

Do you have eny Idia?

I can not send mail to smeserver.
I am traing to send xxx@phonenumber.fax and server respond - invalid recepient!!!