> -----Original Message----- > From: owner-postfix-us...@postfix.org [mailto:owner-postfix- > us...@postfix.org] On Behalf Of mouss > Sent: Friday, May 07, 2010 11:51 PM > To: postfix users > Subject: Re: Php hook for all my emails > > Andrés Gattinoni a écrit : > > On Fri, May 7, 2010 at 5:29 PM, Noel Jones <njo...@megan.vbhcs.org> > wrote: > >> On 5/7/2010 2:53 PM, Andrés Gattinoni wrote: > >> 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. > > > > Thanks for your response Noel. > > I've checked out that link. The thing is that I don't actually to do > > any filtering inside my script, I just need to gather some > > information. > > What kind of information? if it's just about envelope, then logs are > enough. I am now doing it by parsing the logs, but I want to get the following information in a MySQL database (currently I get it from the logs, but that takes a few hours to parse for 1 day logs). I currently log the following data in a MySQL database: - sender (email address) - receiver (email address) - IP sender (from where did postfix receive it) - date/time (when) I would like to add: subject (but I didn't find a solution yet for that). Also doing it "realtime" and not with a delay (as we don't do parse it every minute and putting it in a database when we receive the information would be great).
What do you think is the best solution? > > > Maybe there's an easier way that I can do that without having to call > > sendmail again. > > > > [snip]