by Daniel P. Benjamin http://hivelogic.com/macfax.php
Below are instructions for turning a spare Mac into a web and fax server.
These instructions are a very quick-and-dirty tutorial for advanced Mac users, mainly just to get this information out there.
Find a Spare Mac
Any Mac that can run Panther will work just fine. Panther-capable Macs all tend to have fax-modems as well.
I used a brand new Indigo G3 iMac, which runs Panther just fine.
Sign-Up for Distinctive Ring
If you don't already have it, call your phone company and tell them you want the distinctive ring service*. This service assigns you an additional number with its own unique ring. Your fax server will answer only calls that come in on the distinctive ring, rather than answering all of your "normal" calls.
Install Panther
You'll need Panther's faxing, email, and Folder Action capabilities. Jaguar won't cut it. Perform a clean install rather than an upgrade, if possible.
Enable Your Services
Apache: Go to the Sharing Panel in System Preferences. Select the Services tab. Check thePersonal Web Sharing box.
Mail: First, you'll need to set Panther's email subsystem to start-up automatically at boot-time.
Run Terminal. Type:
sudo pico /etc/hostconfig
Enter your password when prompted.
If you have BBEdit and have installed the command-line tool, you could just as easily do:
bbedit /etc/hostconfig
Find the line that reads:
MAILSERVER=-NO-
To:
MAILSERVER=-YES-
Save the file. To avoid having to reboot, you need to start the email subsystem manually. Back in Terminal, type:
/System/Library/StartupItems/Postfix/Postfix start
Press Return and the email system will start.
Enable Faxing
You signed up for distinctive ring already, right? If not, do it now.
Now you need to configure the system so that it only answers calls coming in on the distinctive ring.
Back in Terminal, type:
sudo pico /usr/bin/fax
Or, if you've got BBEdit, type:
bbedit /usr/bin/fax
Find the line that reads:
INIT="-iZ -i&FE0&D2S7=120 -i&C0"
And change it to read:
INIT="-iZ -i&FE0&D2S7=120 -i&C0-SDR=2"
Go to the Print & Fax Panel in System Preferences. Click the Faxing tab. Check the Receive faxes on this computer checkbox.
Set Answer after to 1 or 2 rings.
Make sure that only the Save to: checkbox is checked. From the drop-down box, select Other Folder...
Navigate to the /Library/WebServer/Documents folder. Click the New Folder button and create a folder named faxes, all lowercase.
Select this new folder. Now when a fax comes in, it will be saved to your new web-accessible folder.
Create the Email Notification Folder Action
Enter the following code into ScriptEditor (located in /Applications/AppleScript):
property email : "you@yourdomain.com"
on adding folder items to this_folder after receiving these_items
set myip to do shell script "ifconfig | grep 'broadcast' | awk '{print $2}'"
set the_name to name of (get info for these_items)
set message to "You received a fax on " & (current date) & "." & return & return & "You can view your new fax on the web here:" & return & return & tab & "http://" & myip & "/faxes/" & the_name
do shell script "echo " & quoted form of message & " | mail -s \"You have a new fax!\"" & email
end adding folder items to
Change you@yourdomain.com to your own email address.
Save the file as a Script called "FaxMsg" into /Library/Scripts/Folder Action Scripts.
Attach the Folder Action
Navigate to the /Library/WebServer/Documents folder. Right-click on the faxes folder you created earlier. Click Enable Folder Actions. Right-click on the faxes folder again, and clickAttach a Folder Action. Select the "FaxMsg" script you just created and click Choose.
Test It Out
Drop a PDF file (or a .gif or .jpg file) into the faxes folder. Wait a minute or two and check your email.
If you don't care about security, you're done. If you do, keep reading.
Security Notes
It probably wouldn't be a bad idea to secure your faxes directory to preventing non-authorized users from viewing your received faxes.
Time to edit some files again, namely Apache's configuration file. Back in Terminal, type:
sudo pico /etc/httpd/httpd.conf
Or, if you've got BBEdit, type:
bbedit /etc/httpd/httpd.conf
Search for the word "htaccess" (Control-W in Pico). It should take you to a line containing the following text:
# This controls which options the .htaccess files in directories can
The line directly beneath that paragraph should be
AllowOverride None
Change this line to read:
AllowOverride AuthConfig
Save the file and quit Pico or BBEdit.
We need to restart Apache to make these settings take effect. The easiest way to do this is right there in Terminal:
sudo apachectl restart
Now you need to create a password authentication file. In Terminal, type the following command:
sudo htpasswd -c /Library/WebServer/Passwords macfax
When prompted, you'll need to enter (and then verify) a password for the macfax web-user we're creating. This is the password you will type in order to gain access to your faxes via the Web. Make it something you'll remember but difficult to guess. You can always change it later by executing the command above.
The last step is to create the authentication file in the faxes folder. In Terminal, type the following command (don't forget the "." in front of htaccess):
sudo pico /Library/WebServer/Documents/faxes/.htaccess
Or, if you've got BBEdit, type:
bbedit /Library/WebServer/Documents/faxes/.htaccess
Enter the following text into the file exactly as it appears below:
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /Library/WebServer/Passwords
Require valid-user
Save the file and quit Pico or BBEdit.
Now when you access the faxes folder via the Web, you'll see a dialogue box prompting you for a username and password. The username you'll need to enter is macfax which we specified in the creation of the Passwords file. The password is the password you entered when creating that user.
* Telstra calls it FaxStream Duet. FaxStream Duet is a new service provided by Telstra and is available on most telephone exchanges. Duet is provided at a cost of $4.00 per month, resulting in a considerable saving over the $20.00 per month associated with the use of a dedicated fax line.
No connection fees apply and the charge is added to your normal account. For further information, please contact your local dealer or call Telstra on freecall 1800 058 058.
Ed’s Note: This hasn’t been tested. If it doesn’t work maybe the Fax Mate will ($99 from http://natcomm.com.au/australia/index.cfm?page=product_details&id=45&product_id=45#order). See http://www.ncwa.com.au/fax_mate.htm.