Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

E-mai to Fax Gateway

I need to set up an e-mail to fax gateway for a couple of the users we have locally. We do not have dial-in capability, so i have heard of Qfax and the services it can provide. But i would like the configuration to be different. What I want is to be able to basically recieve e-mail for any of our users and be able to designate whether or not they should ALSO have their e-mail faxed to them. This should also be able to be set up on a per user basis. (Some users come into the office and check it, some do not come in for weeks at a time) I hope this describes the problem, now i need a solution.
0
davegags
Asked:
davegags
1 Solution
 
jkillenCommented:
To do this for all users you would have to add your faxer (Qfax) as a mail handler in your sendmail.cf file.  

To do this on a peruser basis you should probally try using a program called procmail.  It will let you run a program (Qfax) on
a mail that has been received.
0
 
davegagsAuthor Commented:
Please elaborate on your answer, I know i can add efax as a mail handler. I would use it instead of the program that handles local mail delivery, but how? and how would i define a different fax number for each user? (keep in mind that i also want to append the e-mail to their mailbox as well as fax it to them)
0
 
dirgeCommented:
The easiest, most cost-free way to do this is to hook up to TPC's free email-to-fax gateway:

1. Check if your area is covered by TPC's email-to-fax network (a lot of states/countries are) -- http://www.tpc.int/

2. If the user's info is

Login: johndoe
Name: John Doe
Address: Marketing Dept
Fax: +1-417-1234567

have the user create a .forward file (in his home dir) in this manner:

johndoe, remote-printer.John_Doe/Marketing_Dept@14171234567.iddd.tpc.int

i.e. Replace spaces with underscores; get rid of extraneous symbols in the fax number.

Here's a simple PERL script to do this (no error checking, etc.):

-----start of script-----
#!/usr/local/bin/perl

# FAXforward script

# Get info
$user=getpwuid($<);
print "Username/mailbox (or enter for '$user'): ";
chomp($user2=<>);
$user=$user2 if $user2 ne "";
print "Name: ";
chomp($name=<>);
print "Address: ";
chomp($address=<>);
print "Fax number (include country/area code): ";
chomp($phone=<>);

# Transform info
$name=~s/ /_/g;     # Replace spaces with underscores
$address=~s/ /_/g;
$phone=~s/[^\d]//g; # Get rid of non-digits

# Save .forward
open(FILE,">.forward");
print FILE "$user, remote_printer.$name/$address\@$phone.iddd.tpc.int\n";
close(FILE);
print "Done. .forward file updated.\n";

-----end of script-----

chmod 755 the script and copy to users' home directories. Script written as is must be run from the home dirs.

3. Once the .forward file is setup, any mail sent to johndoe@yourdomain.com (from the example) also gets faxed via TPC, with the name and "address" as the coversheet. The email message also gets stored in the proper mailbox. To quit sending faxes for a particular user, just delete or rename his/her .forward file.

You really should read the TPC FAQ (http://www-usa.tpc.int/tpcfaq.html), as it covers other options such as a MIME format which allows more complete fax covers, the terms of service, etc.

Hope this helps.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now