Jean-Paul van de Plasse wrote:
> 
> ----- Original Message ----- From: "Jake Vickers" <[EMAIL PROTECTED]>
> To: <qmailtoaster-list@qmailtoaster.com>
> Sent: Tuesday, January 16, 2007 9:55 PM
> Subject: Re: [qmailtoaster] Off Topic
> 
> 
>> Ronnie Tartar wrote:
>>> I don't think that will be a problem, this will be a dedicated
>>> machine to route all incoming faxes (tiff) attachements and voicemail
>>> (mp3) attachements through it to the mail server.
>>>
>>>
>>> ----- Original Message ----- From: "Jake Vickers" <[EMAIL PROTECTED]>
>>> To: <qmailtoaster-list@qmailtoaster.com>
>>> Sent: Tuesday, January 16, 2007 3:34 PM
>>> Subject: Re: [qmailtoaster] Off Topic
>>>
>>>
>>>> Ronnie Tartar wrote:
>>>>> I need to create an SMTP gateway that will take attachments, wav
>>>>> and tiff and convert them to mp3 and (jpeg or pdf).  Any ideas on
>>>>> how to start this?
>>>>>
>>>>> I hate storing wave files on mail server and faxes in tiff format. 
>>>>> too much space.
>>>>>
>>>> That gets rather complicated. Attachments are stored as MIME type in
>>>> the email themselves, so you'd need to use something like ripmime to
>>>> extract the attachment, and then run a script on it to do your
>>>> conversions, and then put the NEW attachment back into the email
>>>> (which will probably break SPF).
>>>>
>> Just some coding involved. The messages are saved in Maildir format
>> under /home/vpopmail/domains/yourdomain.com/youruser/Maildir/new/blahblah
>> You'd write a script to watch for these files (or process them in a
>> batch every couple hours), rip the MIMNE out of the message, pipe it
>> into lame or whatever (you'd also have to write some conditionals into
>> the script to look for specific MIME types), then put the mp3 back in
>> the MIME section of the message. I can think of how to do the first
>> couple parts, but putting it back into the email is something I can't
>> think of at this time. May hit me later.
>>
> [resend since my first reply seems to be stuck in queue...]
> 
> I would take a slightly different path..
> 
> Get the data directly into a  php script on receipt (with a | into php
> scriptname ie).
> 
> Use a mimeparser in your script, find the mime types you want to change,
> change them on the fly and put the new data back . Send or write it to
> the right place..
> So all is basically one php-script. (Or c program if you want)..
> 
> Should be not to difficult really..
> 
> JP
> 

I'd try along these lines too. Check into simscan/ripmime. The mimes are
already split out by ripmime, I think in the simscan working directory. I
don't know if they get re-assembled to pass on, or how that actually works.
Ideally, you could replace the tiff/wav with the converted counterpart in
the simscan working directory, reassemble the message and pass it on. I'd
delve deeper into simscan and see if you can't put some hooks in there.

-- 
-Eric 'shubes'

---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to