I'm trying to implement an email-to-fax gateway using Postfix +
Hylafax. Hylafax's provide faxmail command does function - but it
doesn't accomplish what I want. In particular, I would like to:
1. Send an e-mail with one or more attachments intended for faxing.
The attachments will already be in hylafax-recognizable format
(postscript, pdf, or tiff).
2. The sent e-mail will include the target fax number in the recipient
address.
3. The subject of the e-mail will be used as the subject on the fax
cover page.
4. The body of the e-mail will be used as the comments on the fax cover
page. The body will be text only, font is irrelevant.
Currently, I can use a simple pipe transport to the "faxmail" utility, as:
fax unix - n n - 1 pipe
flags= user=fax argv=/usr/bin/faxmail -N -T -d ${user}
This obtains the destination fax number from the mail recipient, and
passes along the message for processing. However, because of how
faxmail processes the mail, it results in the following:
1. The body of the email does not appear in the cover page.
2. An intermediate fax page is generated (between the cover page and
the attachments) that contains anything present in the mail body, plus
some headers.
I didn't know if there was a Postfix facility, or a known third-party
tool, that could take an e-mail message, and strip off everything EXCEPT
the attachments. Similarly, if there was a tool that could extract the
"clean" body of the message without attachments or headers.
--
Daniel