Faxing is one of the world's great business constants. This ubiquitous technology has changed the world and can be found in any office and a number of homes around the world. Even when we don't have dedicated fax machines, we use PC or network-based faxing. Putting a fax modem on every PC in your organization doesn't just sound ridiculous—it is. Might I then humbly recommend a great fax solution, free of charge, combined with the dependability of Linux? Wonderful!
While deciding on how to present this article, I thought about all the great free software available for Linux. Your Linux distribution CD contains thousands of such programs. The catch is that not all of them are pretty—extremely functional, but not pretty. Windows users still shudder at the thought of the dreaded command line. So how do we, Linux gurus all, protect them and impress them with the power of our Linux servers? I can hear some of you saying “We don't!”, but seriously, Windows is still out there and will be for some time. Convincing users from the Windows world that hidden behind the command-line interface is a product that will satisfy their needs is sometimes difficult, even when it's something as simple and useful as free network faxing for the office.
As developers and supporters of what will invariably become the next great operating system, both as server and on the desktop, we can ease the confusion of the terrifying command line by wrapping the solutions we offer in friendly, easy-to-use interfaces. My solution often involves hiding the magic of the command line behind a friendly web-style interface. After all, everybody loves their browser—http://www.allplaynowork.com/, anyone?
I will show you how to create an integrated fax solution for your Windows 9x users to make faxing as easy as printing. Using the web-based administration tools, you can then off-load some of the responsibility for watching all those faxes go through to your users.
At the end of the article is a URL link from which you can download the full distribution for MultiFax. Find yourself a nice comfy chair, and we'll begin.
Well, luckily, not much. You should take a moment and think about this one, though. Will you be using your fax modem as a permanent fax solution, or will you be sharing the fax modem with a dial-on-demand PPP connection? The answer will define whether you can use your current fax modem, or whether you should consider adding another to your system. In my case, I use the same connection for Internet access as for faxes. When I need to pick up a fax (or send one out), I simply take down my Internet connection (by killing my diald process), and start a single process for the fax. In a busy office, that may not be such a hot idea.
Gert Doering's mgetty+sendfax is a relatively easy-to-use fax solution for the office, that is, if you're a command-line-savvy Linux user. The great thing is that it comes with your Linux distribution. Red Hat's package includes it as one of the default choices during installation. I checked my SuSE distribution as well as a Caldera CD and they all had it, so finding it should not be a problem. The latest version of mgetty+sendfax is always available at metalab.unc.edu (formerly sunsite.unc.edu) under the pub/Linux/system/serial/getty directory.
Combined with Horst F.'s respond utility for Windows, it provides a rugged and easy-to-use fax mechanism from the Windows desktop. Horst's utility, which lives on your task bar as a tray icon, appears as a fill-in form whenever a user submits a fax to the queue. You enter the destination name and phone number, click OK, and off go your faxes. You can get the respond program at www.boerde.de/~horstfhttp://www.boerde.de/~horstf. While there, make sure you pick up the accompanying printfax.pl Perl script and the recommended smb.conf entry for Samba.
Create a directory on your Windows PCs (or in a shared drive on the network) and copy RESPOND.EXE there. On my office PCs, I put everything communications-related in a directory called C:\COMM. Then I have subdirectories for my applications. RESPOND.EXE lives in C:\COMM\FAX. It doesn't really matter where it lives, so long as you know where you've put it.
Once the mgetty+sendfax package is installed on your Linux system (whether with an RPM install or compiled from source), you will need to set up some basic configurations before moving on. On my Red Hat 5.2 system, most of these live in the /etc/mgetty+sendfax directory. Your distribution or install may put them in a different place.
You can get a lot of detail from the mgetty+sendfax FAQ on setting things up, but if you're in a hurry to get faxes moving, here are some of the basics. The config files I took the time to set up are named sendfax.config, mgetty.config, faxrunq.config and faxheader.
In the sendfax.config file, I set up the following parameters:
fax-devices ttyS1 fax-id 955-555-5555 ignore-carrier y
There are other settings, but I was also in a hurry. Since we have only one fax modem, I set up ttyS1 as my fax-devices entry. The fax-id is the phone number your fax modem announces to the other fax machine. The third line is to correct a nasty US Robotics problem I had with my fax—it tells the fax program not to hang up between pages of my fax transmission.
On to the faxrunq.config file, essentially, I set only one parameter here. That was:
Since we have e-mail set up in our office, my Linux system sends us mail when a fax has been successfully sent out. You may or may not want to set this one. If you are setting up large broadcast fax lists, you may not want to get a hundred or more messages confirming each successful fax, or maybe you do. Whatever you decide, consider this carefully before you set up your system. Fear not, though—you can always go back and change it if you find that you made the wrong decision (after you've read your 300 confirmation e-mails).
In my mgetty.config file, I also make only one change:
More on that change later when I discuss security.
Finally, we have the faxheader file. Mine looks something like this:
FAX FROM: **Marcel & Sally** 955-555-5555 TO: @T@ PAGE: @P@ OF @M@
Okay, so my number is not 955-555-5555—you got me there. This defines the identification information that appears at the top of every fax we send out. Pages are numbered for easy reassembly when they are inadvertently dropped on the floor.
You should also make sure that you have a fax.allow and a fax.deny file in the directory. The fax.allow is a text file with a simple list of user IDs to be allowed fax access. The fax.deny file is a list of people who are not allowed fax access. Alternatively, if you just want everyone to be able to fax, simply omit the fax.allow file and create an empty fax.deny file. If neither file exists, only root can fax. For a network fax solution, this is not a good idea.
One last thing in our mgetty configuration, and we'll move on to the Windows side of the picture. The default umask for /usr/bin/faxspool is 022. Since faxspool is simply a text file, it's easy to modify the netmask so that network users can delete jobs. In the script, we comment out the umask 022 default and add the line umask 000:
# Change umask to 000 so that any user can delete # an old fax # umask 022 umask 000
Earlier, I mentioned security regarding spooled jobs. Security concerns will arise for some users, but in most offices, the fax machine is a fairly public tool. We look at the network fax queue in much the same way. Anyone can check on faxes, clean up their sent jobs, or print out incoming jobs. The odds of a co-worker deleting your job out of spite is generally fairly remote, at least in our office—I can't guarantee civil behavior in yours. As for outside users, I'll assume your firewall already takes care of them.
Speaking of outside users: would you like to receive faxes as well? That one is easy. The mgetty process can be added to your inittab to listen for incoming calls on your fax modem. Edit your /etc/inittab and add this line:
In the above entry, fax1 is an arbitrary name I've chosen. In your case, you may pick a different name just as you may need to specify a different device than my ttyS0. Finally, tell the system to reread the inittab with this command:
mgetty is ready to receive incoming faxes and will restart the listener process each time it hangs up. In my office, we share the fax with our Internet connection, so I simply start a single instance of mgetty with this command:
/sbin/mgetty /dev/ttyS0 &
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- Roll your own dynamic dns
4 hours 42 min ago
- Please correct the URL for Salt Stack's web site
7 hours 53 min ago
- Android is Linux -- why no better inter-operation
10 hours 9 min ago
- Connecting Android device to desktop Linux via USB
10 hours 37 min ago
- Find new cell phone and tablet pc
11 hours 35 min ago
13 hours 4 min ago
- Automatically updating Guest Additions
14 hours 13 min ago
- I like your topic on android
14 hours 59 min ago
- This is the easiest tutorial
21 hours 35 min ago
- Ahh, the Koolaid.
1 day 3 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?