Dirk's FaxMailer Scripts --- V 3.1

This directory contains a couple of scripts, that more or less work
together to implement a faxmailer system --- an Email FAX server. 

The FAX server will allow you to

    o send normal email and have it transmitted as FAX
    o use FAX addresses that are understood by almost all mail user agents
    o take advantage of the capabilities of FlexFax (such as delayed
      transmission, cover page generation, formatting of email,
      manipulating FAX jobs)
    o have an easy to use interface that works from any Unix* machine that
      understands about electronic email
    o receive facsimiles using multimedia mail
    o do authorization checking

Additionally I have provided the fig2faxcover tool that will take a fig
file (as produced by xfig), scan it for certain tags, and finally convert
it to a Postscript file suitable for use as a faxcover template.

To install all this, you need to

   (0) Have MIME (metamail) [thumper.bellcore.com:/pub/nsb], gzip
       [prep.ai.mit.edu:/pub/gnu], and perl installed!

   (1) compile faxmailer.c --- this is a small (very small) piece of code
       that will set the real uid/gid to the effective uid/gid and then
       call the perl script faxmailer-agent. You need to edit faxmailer.c
       to make sure that the FAXMAILER_AGENT points to the place where you
       will install the whole faxmailer stuff --- I installed them under
       /usr/contrib/fax/{bin,lib}, thus replace that with whatever suits you.

       % cc -O -o faxmailer faxmailer.c
       % cp faxmailer /usr/contrib/fax/bin
       % chown uucp.daemon /usr/contrib/fax/bin/faxmailer
       % chmod 6550 /usr/contrib/fax/bin/faxmailer

       As on my machine the sendmail is running under GID daemon I need to
       set the GID of faxmailer to daemon, too.

   (2) Copy faxmailer-agent into the place pointed to by FAXMAILER_AGENT,
       i.e. on my system I'd type

       % cp faxmailer-agent /usr/contrib/fax/bin

       Also, you need to install faxacct (for pretty printing the xferlog
       file) and faxmailer.help-* into their appropriate places.

       % cp faxacct /usr/contrib/fax/bin
       % cp faxmailer.help-* /usr/contrib/fax/lib

       For checking authorization for access to the accounting file you'll
       also need to edit the file hosts-accounting and install it into the
       same directory the FlexFax hosts file lives in (or edit
       faxmailer-agent appropriately).

       Look at faxmailer-agent and make sure that its path definitions are
       all correctly set up. Read thru faxmailer.help-{english,deutsch} and
       adapt the text to your site's needs. Write a new one in
       <whatever-your-first-language-of-choice-is> and send it to me 8=)

   (3) Install the replacement faxrcd script instead of FlexFax' faxrcvd
       script, i.e. on my machine:

       % cp faxrcvd /var/spool/fax/bin

   (4) Make the FAX server known to your mailing system. This is a bit
       tricky, as I'm not sufficiently guru'ized with sendmail (and
       therefore didn't do this). All I know is, that
                 (a) we added an MXENTRY for our FAX server (which is
                     called i4fax) that points to the real name of the
                     machine (magellan in our case).
                 (b) we added two local mailers on magellan, one for mail
                     addressed to someone@magellan, the other addressed to
                     someone@i4fax.
                     
                     The local mailer for someone@magellan is the normal
                     one, the local mailer for someone@i4fax is our
                     faxmailer programm (which in turn call the
                     faxmailer-agent).

        I've included a copy of our FAX server's sendmail.cf --- for all that
        it's worth ...

    (5) Design a nice looking faxcover using Xfig --- take a look at
        cover.fig for an example, and then either
                  - EXPORT it as PostScript, and then call 

                    % fig2faxcover -P cover.ps faxcover.ps

                    or
                  - SAVE it as a fig file, and then call
                  
                    % fig2faxcover cover.fig faxcover.ps

        To provide for the variables used by FlexFax' faxcover you have to
        use special text inside xfig (this text needs to be a text box of
        its own for this to work):

        Xfig text box           faxcover variable
        -----------------------------------------

        X-to                    to
        X-to-company            to-company
        X-to-location           to-location
        X-to-voice-number       to-voice-number
        X-to-fax-number         to-fax-number
        X-from                  from
        X-from-company          from-company
        X-from-location         from-location
        X-from-fax-number       from-fax-number
        X-regarding             regarding
        X-page-count            page-count
        X-comments              comments
        X-todays-date           todays-date

        If you are also designing and including Xfig generated logos (like
        in my example for the Gravitchco Chocolate Company) you need to
        massage them a little bit --- use the supplied fig2logo command:

        % fig2logo your-logo-file.fig your-logo-file.eps

        After doing this you can then include your-logo-file.eps in the
        cover.fig file.
       
        Install the generated faxcover.ps instead of FlexFax' faxcover.ps,
        i.e. on my box:

        % cp faxcover.ps /usr/contrib/fax/lib

This should do the trick. You should be able to get a help file mailed to
you, if you send a mail with the subject "help" (or "hilfe" if you want to
get the German version of it) to the FAX server.

Also, if your email address is in hosts-accounting, you can send a mail to
the FAX server with the subject "accounting" to get a pretty printed
version of xferlog send to you.

If there are any questions left, send me a mail and I'll try to answer:

                    husemann@informatik.uni-erlangen.de

Or --- send a FAX!

Have fun!

     Dirk Husemann

Dirk Husemann                                   Tel.: +49 9131 85 8029
University of Erlangen-Nuremberg                FAX : +49 9131 85 8732
Department of Computer Science IV
Martenstrasse 1            
D-91058 Erlangen, Germany

Dirk.Husemann@informatik.uni-erlangen.de
/C=de/A=dbp/P=uni-erlangen/OU=informatik/S=husemann/G=dirk/


