[Mimedefang] action_external_filter: entire contents
TOUZEAU DAVID
david.touzeau at fr.kaspersky.com
Wed Jun 11 16:20:13 EDT 2008
Hum many thanks for your answer Steffen but did you have a piece of
example code that just explain the right direction in order to execute
an external program ?
Steffen Kaiser a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, 9 Jun 2008, TOUZEAU DAVID wrote:
>
>> I prefer the second way explain by scanning message in INPUTMSG but i
>> did not really understand mimedefang-protocol.
>
> The structure / calling sequence of the functions are described in man
> mimedefang-filter, the directory structure etc. in mimedefang-protocol.
>
>> In this way, how to hook Mimedefang in order to force it to run an
>> executable program just after write INPUTMSG file, wait the execution
>> an return back to proccess
>>
>> What do you think if i write this code and put it in filter_end() ?
>>
>> if(-e "./INPUTMSG"){
>> open(MYTOOL,"/usr/sbin/mytool |") or md_graphdefang_log("Failed
>> opening mytool");
>> @result = <MYTOOL>;
>> chomp $result[0];
>> close(MYTOOL) or md_graphdefang_log("Failed closing mytool");
>> }
>
> Well, I suppose this piece of code does not do anything useful.
>
> David did a good job crafting the various resend_message_...()
> functions in order to bypass shell, pitfalls, etc. (it's the backend
> function of stream_by_recipient())
>
>>> filter user can write to the backup store, you can do so right in
>>> filter()
>
> ^^^^^^
> meant filter_begin() actually :(
>
>>> or filter_end() directly. (see man mimedefang-protocol)
>
> Bye,
>
> - -- Steffen Kaiser
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFITiqQ5ThHZhj8SBwRAnpmAJ0TYiJJvn8PTC9veehXdFhHMY9YSgCeMTzi
> 1NDUbQg/OrmZO72zPSZoJ0c=
> =fwxF
> -----END PGP SIGNATURE-----
> _______________________________________________
> NOTE: If there is a disclaimer or other legal boilerplate in the above
> message, it is NULL AND VOID. You may ignore it.
>
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>
--
* 01.41.39.04.42
* 06.20.56.74.33
* ICQ:160018849
* Skype:dtouzeau
* Site technique destiné aux entreprises:
http://entreprises.kaspersky.fr
* Inscrivez-vous dès maintenant dans l'espace partenaires !
<http://partners.kaspersky.fr>
(Retrouvez sur ces sites des faqs, tutoriaux, Forums et liens de
téléchargement de la gamme Buiness Optimal)
* *
More information about the MIMEDefang
mailing list