On Thu, 10 Feb 2005 05:33 pm, [EMAIL PROTECTED] wrote: > Hi all I've an application (Some cisco fax hardware) that on receipts of a > fax sends it to a email address. What I need to do is find some way of > printing those automatic to different printers depended on the incoming > address. > > Does any one have a starting point for doing this I've had a google but > have yet to come up with anything useful > > Thanks
Maybe I'm not seeing the complete complexity, but I was thinking a procmail recipe that calls a script and prints to a specific printer. That way, procmail is parsing the message recipient/sender (what it does best) and then the script can handle the printing; lp/lpr can print the message etc. Cavaets (for the script): 1. You may need some extra tools to rip out the attached file (assuming the fax message is actually an attached PDF/PS/TIFF etc). 2. You may need to "filter" the attachment (from #1) through something else to generate the correct input for lp/lpr. 3. You may be able to skip #2 if you configure cups to use the correct filter directly (this is how I print PDF's from the command line - cups does all the hard work in ghostscript on its own). All of the above is screaming Perl or Pythhon to me as both languages have tools/libs for directly processing e-mail messages and attachments. lp -d <dest-printer> lpr -P <dest-printer> Both accept input from STDIN or a specified file. Have fun, James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
