On 5/7/2010 2:53 PM, Andrés Gattinoni wrote:
Hi there,

I've just suscribed because I'm having troubles to set up a postfix
server and just can't find the right answer in google.

I'm running Postfix 2.3.3 on a CentOS 5.4 box with Dovecot 1.0.7 for
authentication, Amavisd-new 2.6.4, SpamAssasin 3.3.1 and ClamAV 0.96.
I finally got it all working (I had never installed Amavisd-new
before, and that took me a while to figure out), but now I need
something more.

I need to set up some sort of hook that calls a PHP script for each
email received. I need something that can be applied globally to all
incoming emails (including the ones that are locally delivered) or at
least to all the addresses of a domain (because I won't be having too
many domains).

Here's an example of a shell script that receives all mail. Shouldn't be much of a stretch to use PHP instead.
http://www.postfix.org/FILTER_README.html#simple_filter

If you still want to use amavisd-new, then use multiple postfix instances for each filter hop.

Another alternative is to integrate your code into amavisd-new, either as a custom hook or as a pseudo antivirus scanner. Check the amavis-users archives for other folks doing similar things.


  -- Noel Jones

Reply via email to