[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -
[   ]emailaddr-parse.pl31-Jan-2012 05:41 846
[   ]faxmail.pl31-Jan-2012 05:41 7.6K
[   ]mail2fax.pl31-Jan-2012 05:41 1.0K
[TXT]readme.txt31-Jan-2012 05:41 1.9K


Original: http://people.ifax.com/~aidan/hylafax/mail2fax/

(See below for faxmail.pl enhancements.)

These are a set of simple perl scripts which can act as a mail2fax gateways in
combination with your favour MTA.

Simply get your MTA to invoke this program:
    cat message | /path/to/mail2fax.pl 

Or
    cat message | /path/to/faxmail.pl 

mail2fax.pl is a very simple "template" to start from if you need custom
handling of different attachments and mime-types.

faxmail.pl is a more featurefull mailer, which handles more (including any I18N
text parts, including headers).  To use this, you'll need text handling rules in your typerules
file that handle UTF-8 text files.  I use this as the first line of my typerules file:
    # Handle "Email" text specifically
    0       string From:            ps      iconv -f UTF-8 -t ISO-8859-15 %i | \
                        a2ps -X ISO-8859-15 -R -PA4 --header=" " --footer= --left-footer= --right-footer= -=mail -1 -g -o %o

Unfortunately, I haven't found any good text => postscript converters that
handle UTF-8 natively, thus my use of iconv to push the UTF-8 text through a2ps
(which understands latin charactersets, but not unicode).

+++

faxmail.pl is enhanced by filtering out the destination fax number
and uses the subject field as the job identification string (etc.).

Mail addresses can be three ways:
  1) user@host.org
  2) "User Name" 
  3) user@host.org (User Name)

In the latter cases, quotes may or may not be used,
there may or may not be any User Name at all, and User Name
may come before or after user@host.org.

Of course, 'user' stands for the faxnumber in this case!

You may simply integrate it in your sendmail/MTA setup by:

/etc/aliases:
    mail2fax: |/usr/local/bin/faxmail.pl

/etc/mail/virtusertable:
    @fax.my.domain.net mail2fax


Then all fax send to eg (see above): 
    To: My Customer <001831700555@fax.my.domain.net>

should get processed by sendfax.

+++