Re: Building milter in PHP

2009-08-23 Thread Mikael Bak
rank1see...@gmail.com wrote:
 It did, but not anymore.
 It is now depreciated.(php-milter)
 
 I use PHP 5.3 and already have working filter.
 
 To finalise it, I just need a list and description of milter commands.
 Those milter commands works for any type of coding language
 
 Up to now I've found out these but without explanation or examples
   connect
   helo
   envfrom
   envrcpt
   header
   eoh
   body
   eom
   abort
   close

Perhaps you should have a look here:
https://www.milter.org/developers

I'm sure you can find example code there.

HTH,
Mikael


Building milter in PHP

2009-08-22 Thread none none
I've setup postfix for before queue
I have not chosen to install milter but to create my own.

I did that in PHP.

Now, I am at a part, where my PHP milter has to communicate with postfix.

Aim is to get string from postfix, evaluate it and send it back to postfix.
So I started to read as a first action.

Errors I did received were:
can't read SMFIC_OPTNEG reply packet header: Operation timed out

At that point I've figured out that PHP milter has to say something to postfix
So I've sent string Hello! Killer here, send me a victim!


unreasonable packet length: 1265200236  1073741823
At that point I've figured out that PHP milter is sending to long
welcome message.

Then I've sent just a dot .


EOF while reading command code: Operation timed out
A-ha!
So here is a catch! COMMAND!

postfix and each milter, have some string commands, they use to comunicate.

So please can anyone give me a link to those command(Something to do with DEV)
;)

So I could finish my PHP milter(DA KILLA!)


Re: Building milter in PHP

2009-08-22 Thread Wietse Venema
none none:
 I've setup postfix for before queue
 I have not chosen to install milter but to create my own.
 
 I did that in PHP.
 
 Now, I am at a part, where my PHP milter has to communicate with postfix.
 
 Aim is to get string from postfix, evaluate it and send it back to postfix.
 So I started to read as a first action.
 
 Errors I did received were:
 can't read SMFIC_OPTNEG reply packet header: Operation timed out

The Sendmail MILTER protocol is completely different from SMTP.  

PHP already comes with a SAPI (server API) that supports this protocol,
and you should probably build your application that way.

See, for example: http://www.google.com/search?q=php+milter

Wietse


Re: Building milter in PHP

2009-08-22 Thread rank1seeker
- Original Message -
From: wie...@porcupine.org (Wietse Venema)
To: Postfix users postfix-users@postfix.org
Date: Sat, 22 Aug 2009 19:18:19 -0400 (EDT)
Subject: Re: Building milter in PHP

 none none:
  I've setup postfix for before queue
  I have not chosen to install milter but to create my own.
  
  I did that in PHP.
  
  Now, I am at a part, where my PHP milter has to communicate with 
postfix.
  
  Aim is to get string from postfix, evaluate it and send it back to 
postfix.
  So I started to read as a first action.
  
  Errors I did received were:
  can't read SMFIC_OPTNEG reply packet header: Operation timed out
 
 The Sendmail MILTER protocol is completely different from SMTP.  
 
 PHP already comes with a SAPI (server API) that supports this protocol,
 and you should probably build your application that way.
 
 See, for example: http://www.google.com/search?q=php+milter
 
   Wietse


It did, but not anymore.
It is now depreciated.(php-milter)

I use PHP 5.3 and already have working filter.

To finalise it, I just need a list and description of milter commands.
Those milter commands works for any type of coding language

Up to now I've found out these but without explanation or examples
  connect
  helo
  envfrom
  envrcpt
  header
  eoh
  body
  eom
  abort
  close