HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] faxmail and mimetypes, what's the current info?
Joshua Kinard wrote:
I was looking at this info:
http://www.hylafax.org/content/Email_to_Fax_Gateway
But it states at the top that:
*** NOTE*** This describe the old pre 4.4 version of faxmail. Beginning with version
4.4.0, faxmail now handles attachments natively, according to the same typerules logic as
sendfax.
So am I to assume all the scripts in this folder and on that page are irrelevant now?
That depends if you're using a hylafax.org 4.4.x release or not. All
hylafax.org releases prior to 4.4.x and all HylaFAX+ releases (including
5.2.2) work with MIMEConverters. Furthermore, I think that hylafax.org
has backtracked and re-instated MIMEConverters - or at least plans to.
And thus the "NOTE" there is quite misleading.
Assuming they aren't, I can see where a mimetype of a single block of data can be decoded as say, pdf, tiff, etc.. But since an html page can have several different mimtypes in it (html, png, jpeg, etc..), a switch statement that looks for a single mimetype won't work. At least not the default-written one included in hylafax as far as I know.
You are correct. An HTML attachment with in-line images, etc., will
*not* be imaged as expected with faxmail.
I assuming in theory, I would want to create a /usr/local/lib/fax/faxmail/application/html, and referring to the site above, create both the html bash script and the python scriptlet (multi-write-0.1.py, it calls itself). But the question is, how can I instruct HylaFAX to know when it's getting an HTML attachment w/ inline graphics, and route the whole mess through that script, while keeping other, single-attachment mails going through their respective filters?
You can't. faxmail doesn't work that way, and it would really require
quite an overhaul to get it to working. Far, far easier would be to
simply bypass faxmail altogether and use your own customized mail-to-fax
"sendfax wrapper" script. Such as you can see here:
http://hylafax.sourceforge.net/howto/faxing.php#ss5.4 (look for
"sendfax wrapper")
You'd need to decode things and put them in places where html2ps expects
them to be for it to be able to produce the inline images as expected.
It'll take a little bit of work to get going, but for all real purposes
doing that is far easier than trying to change the whole way that
faxmail works.
And am I correct in assuming that application/octet-stream only gets invoked for unknown mimetypes that faxmail isn't aware of, or is that the sort of master script that directs attachments to the appropriate converter scriptlet?
application/octet-stream gets invoked when the mail's Content-Type
labels the content as such. Microsoft Outlook has the bad habit of
calling everything binary as such... and everything non-binary as
"quoted-printable".
(Note: I've seen some references to a mimetype of 'multipart'...I think this may be what I'm looking for, but there's not a whole lot of documentation on this subject or at this level of detail, so I thought I'd ask anyways).
faxmail handles multipart messages just fine on its own. But I don't
think that it's particularly relevant to your search.
In the HTML there will be tags identifying which mail part is to be used
for the in-line image. You'll have to do some scripting work to make it
go, but it shouldn't be impossible.
Thanks,
Lee.
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*