After going through the mail thread, following are my advices for you:
1. sendmail-jilter (http://sendmail-jilter.sourceforge.net/) works on mail filter protocol, since Postfix also supports mail filter protocol, so it works with Postfix.
Use following settings in your postfix 'main.cf' for sendmail-jilter to work properly with your Postfix setup:
#Milter support for smtpd mail
milter_default_action = reject
milter_protocol = 2
You need to launch your mail filter (using sendmail -jilter) to be running on local machine port 10028 (any number you please).
2. You can use subethasmtp (http://code.google.com/p/subethasmtp/), if you want to use a content filter for the tasks that you have mentioned.
Use following settings in your postfix 'main.cf':
content_filter = scan:localhost:10030
Keep in mind that if you want to re-inject the emails back to postfix, you need to do appropriate settings in your 'master.cf' (refer postfix documentation).
As a general rule I put relatively less time consuming / lightweight tasks for mail filter while other tasks I put in the content filter.
From: owner-postfix-users@... [mailto:owner-postfix-users@...] On Behalf Of Wietse Venema
Sent: Thursday, June 20, 2013 4:28 AM
To: Postfix users
Subject: Re: Postfix Content Filter
> Thank you Wieste. Sorry for the repetition but the python or the Java
>vers -ion of the jitler a good option? My use case is very basic so
>Java is much p -referred for milter development if jitler framework work with the postfix.
I wrote Postfix, and don't use every milter in the universe.