[Alpine-info] How to print faxes automatically
Doug Barton
dougb at FreeBSD.org
Mon Jan 17 12:09:30 PST 2011
On 01/17/2011 08:02, Eduardo Chappa wrote:
> On Fri, 14 Jan 2011, lists.alpine-info at duinheks.nl wrote:
>
> :) What I want to do is print faxes, which are sent to me as e-mail
> :) attachment, automatically to the printer.
> :) Somebody adviced feeding them to a script.
>
> I can not think of any way that Alpine could feed automatically a *full*
> message to a script. Alpine can feed automatically the main body of a
> message to a script, but not the full message. I believe that you need
> another tool that can extract attachments, so you can send the attachment
> to the printer, but Alpine is not the tool for that.
You can pipe the raw message to a script that splits the attachments. I
use this technique in my "pine pgp filters" scripts:
http://dougbarton.us/PGP/ppf/index.html
You can look at the ppf_mime_decrypt script particularly for an example
of how this works. The caveat however is that splitting a MIME message
in a script is not for the faint of heart. :) Different mail clients
have significantly different ideas about how to format the message, some
of which are even different in different versions of the same client.
The good news is that much of the complexity of the ppf_mime script
could be avoided since all you really care about for this purpose is
determining the MIME message part boundary. It certainly _can_ be done,
and I hope that this example helps.
Doug
--
Nothin' ever doesn't change, but nothin' changes much.
-- OK Go
Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price. :) http://SupersetSolutions.com/
More information about the Alpine-info
mailing list