HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] faxmail and mimetypes, what's the current info?



Hey all,

So I'm playing around with an email2fax setup, and I got most of the pieces in place.  Now I'm trying to work on getting the mimetypes detected properly so that the appropriate converter script runs on a document sent to the fax server.

I can see in /usr/local/lib/fax/faxmail/ that there are several scripts, plus an application/octet-stream script that is nothing but a case statement for several filetypes (discovered by running 'file' on an unknown data source).  But my inquiry is how does one handle html with inline images?

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?


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.

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?

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?

(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).


If anyone has pointers (and no, not the C kind), I'm all ears.  Thanks!,

--Josh


____________________ 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*




Project hosted by iFAX Solutions