[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

email-fax gateway - need suggestions



I was hoping some folks here could give me some suggestions on setting
up an email to fax gateway.

My project is basically to provide a mechanism so someone can email to a
an address in my office (eg "fax@office.com") and have that email
automatically faxed out. This idea is to eliminate the manpower
requirement for faxing out reports, which is  overwhelming our staff who
presently have to print the email and manually fax each report,
sometimes to multiple recipients.

I am aware that this problem has been addressed in various ways using
efax or hylafax, but my requirements are a bit unique compared to the
solutions I've seen:

1. Most commonly, the document that needs to be faxed will be an MS Word
document, send as an attachment to the email message. As a result,
simply trying to fax the email body itself won't work.

2. The people generating the email that needs to be faxed will generally
know the name of a person (or people) to recieve the fax, but not their
fax numbers. We will have an LDAP directory online which will contain
fax numbers, so the handler needs to look up the recipient(s) and
translate names to fax numbers automatically.

3. The sender should get back an email acknowledgement so he knows if
the fax went through or not.

4. After the fax is sent, the file itself (word document) needs to be
saved on our fileserver for later reference as well.

Our present email implementation uses cyrus-imapd as a mail store. Our
email is received at an external pop3 server. We use fetchmail running
as a daemon to periodically retrieve email for all accounts and forward
the email to cyrus (via an lmtp connection).

I was therefore thinking of the following solution: 
1. Write a demon that listens for lmtp connections from fetchmail which
will forward fax related emails to this demon via lmtp (I am in the
process of writing something similar to handle emails and forward them
to the printer automatically, so I can reuse this code anyway).

2. The demon can process the email body based on mime-time. For straight
text, should assume a first line of the format
"FAX:<recipient>[,recipient...]>". For MSWord attachments, the process
is more complicated: The filename will consist of the local patch to
store the file, followed by a list of recipients. Via this mechanism,
the demon knows both where to store the file on the file server and to
whom the file should be faxed.

3. Using wv, the file is converted from MS Word to postscript, and can
then be fed into efax for transmission. The exit status of efax
indicates whether the fax went through, which can be emailed back to the
sender.

I would appreciate anyone who knows of a better / simpler solution, or
comments on what I have proposed I would very much appreciate it.

nl

PS: I am aware that there isn't any security in the above system, and I
recognize the opening this gives for someone to use my fax as a
forwarding station. I haven't yet decided how to handle security in a
meaningful way, but I'm also open to suggestions on this score.





Reply to: