HylaFAX The world's most advanced open source fax server |
Hello;
I am configuring my Hylafax+ 5.4.1 on Fedora 12 for Email to Fax function, when I review the "Email to Fax Gateway" document about the "For HTML emails that contain inline graphics" , there is a script for "python",
can anyone tell me where should I save this script and what is the file name should I call? I am not familiar with python, that's why I have no idea what is the correct steps to make it work. I saw a file name called "multi-write-0.1.py", I thought that
this is the file name for this script, isn't it? Also, I am using Postfix, how can I call this script?
#!/usr/bin/python """Unpack a MIME message into a directory of files.""" import os import sys import email import mimetypes import re import tempfile import shutil def main(): #Get the message from stdin fp = sys.stdin.read() #Convert this to a message object msg = email.message_from_string(fp) #Create temp directory to store contents tempcon = tempfile.mkdtemp() #Change to our tempcon os.chdir(tempcon) patt1 = re.compile('<') patt2 = re.compile('>') ...... ..... This e-mail and any files transmitted with it are confidential and may contain privileged information. It is intended solely for the use of the individual to whom it is addressed and others authorized to receive it. If you are not the intended recipient you must not copy, distribute or use this e-mail or the information contained in it for any purpose other than to notify us. If you have received this message in error, please notify the sender immediately by reply e-mail and delete this e-mail from your system. |