procmail
[Top] [All Lists]

Re: Using MIME to ship faxes from HylaFax into the mail system

1996-01-31 11:01:52
An update on using procmail to distribute HylaFax facsimile into the
Unix mail system, (thanks to Philip Guenther <guenther(_at_)gac(_dot_)edu>, for
the procmail "receipe," which eliminates a shell script.)

HylFax is a fax server that has sources available via anonymous ftp to
sgi.com. To distribute faxes received by HylaFax into the Unix mail
system, using procmail as the interface, put the following in the
FaxMaster's ~/.procmailrc:

    :0
    * ^from:(_dot_)*fax(_at_)my_domain\(_dot_)com
    {
        :0 c
        * ^Subject: +facsimile +received +from
        * B ?? ^\/recvq[^:]*
        |/usr/local/bin/metasend -b -t someone(_at_)my_domain(_dot_)com\
            -F fax(_at_)my_domain(_dot_)com\
            -s "Facsimile mail transmission"\
            -S 5000000\
            -m application/fax\
            -f "/where/hylafax/is/installed/fax/$MATCH"

        :0:
        fax
    }

which will route a MIME copy of the fax to the specified email
address, (someone(_at_)my_domain(_dot_)com, probably the FaxMaster,) using the
metasend program from the MIME distribution.  ($MATCH will contain
something like, "recvq/fax1234aaa.") The sources to the MIME
distribution are available via anonymous ftp to belcore.com. The faxes
can be viewed directly from a MIME compliant mailer using the viewfax
program, which is also available via anonymous ftp to sgi.com, by
placing the following line in your ~/.mailcap file:

application/fax ; showpicture -viewer 'viewfax -geometry +0+0' %s

I use GNU emacs as my mail user agent, which is not MIME compliant. However,
adding the following function to your ~/.emacs file:

    ;
    ; Rmail mime function
    ;
    (defun rmail-mime ()
        "Rmail mime."
        (interactive)
        (shell-command-on-region (point-min) (point-max) "metamail -m emacs -x 
-d" nil nil) ; pipe the message to metamail
    )

will handle much, but not all, of MIME's functionality, including this
application of reading faxes. Or, if VM is preferred:

    ;
    ; Vm mime function.
    ;
    (defun vm-mime ()
        "Vm mime."
        (interactive)
        (vm-pipe-message-to-command "metamail -m emacs -x -d" 0) ; pipe the 
message to metamail
    )

    John

-- 

John Conover, 631 Lamont Ct., Campbell, CA., 95008, USA.
VOX 408.370.2688, FAX 408.379.9602
john(_at_)johncon(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>