Lucio, Quoting Lucio <[EMAIL PROTECTED]>: > I've already took a look at perlfilter-example.pl . Problem is: I don't speak > perl. The example is quite clear and self-explanatory, but I have to learn at > least the basics of perl in order to write my own rules. However I do speak > C. What's easier? Learning perl (which would be useful anyway) to the point I > need or writing a filter in C?
I program regularly in both Perl and C. I wrote the Courier support for amavisd-new (virus scanner) which is written entirely in Perl: in order to interface with the existing amavisd-new use of Net::Server to listen on sockets, I did not use courierperlfilter but kept everything pure Perl. This is not something I would recommend - even courierperlfilter itself is written in C with an embedded Perl interpreter. However if you use courierperlfilter that sorts out that part. Writing the interface part of a filter in C is probably fairly straightforward if you are used to UNIX programming in C and can figure out the documentation in the courierfilter manpage. However actually processing the message is almost certainly easier in Perl. > What about a bash script? Can I put a bash > script in the filters directory? Can I put any kind of executable in there? You can in principle put any kind of executable there, but due to the use of UNIX sockets I can't see any way of writing a suitable bash script. > And what about Java (let alone performance)? I'm afraid I have no experience of Java. > How do I add the new address to > the CC list (regardless of the language I use)? Well you can either add it to the control file. There is a thread relating to this around about http://sourceforge.net/mailarchive/message.php?msg_id=10605059 but I can't work out how to get the entire thread linked together properly in the archive. I don't fully understand this yet, but I intend to implement some control file modification features (a la courier-pythonfilter) in the next version of my amavisd-new patch. It's probably easier just to pass the message directly to sendmail. However, unless you are running the latest development snapshot of Courier, the new message will be passed back to the filter so you will need to spot this and avoid an infinite loop (and potential DOS depending on how you call sendmail). -- Martin Orr Linux Administrator, Methodist College Belfast ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users