Article delegate-en/4178 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] CFI for smtp doesn't work
17 Oct 2008 20:42:45 GMT Serge Leschinsky <pkiiabdyi-lnh3n2fe2gdr.ml@ml.delegate.org>

Dear Sirs,

I wrote a simple CFI for pop3 and it works well but if I try to use the same one for smtp it doesn't work.

I've simplified the filter as much is possible.

Could you please explain me my mistake?

Thank you in advance

--
Serge

-------------- delegate.conf -----------------
#-P110
#SERVER=pop://10.1.1.15
#-v
#FTOCL=./pop3.cfi
#ADMIN=you@your..

-P25
-v
SERVER=smtp://10.1.1.15
FFROMCL=./smtp.cfi
SMTPCONF=myname:delegate.test.com
ADMIN=you@your..

------------------
pop3.cfi -------------------
#!cfi
MIME-Filter:/tmp/p3_test.pl

-------------------------------------------------------
------------------ smtp.cfi -----------------------
#!cfi
MIME-Filter:/tmp/
p3_test.pl

--------------------
p3_test.pl  ------------------
#!/usr/bin/perl -w

use strict;

my $spool="/tmp/dg/spool/";
my $ok = 0;
$|=1 ;

my $time = time();
my $file = join '_',"pop3",$time,$$;

if ( open ( MESSAGE, '>', "$spool/$file" ) ) { $ok=1; }
else {  print STDERR "Cannot open file $spool/$file: $!";}

while (<>) {
  print ;
  print MESSAGE if $ok ;
}
print STDERR "Clean exit\n";

exit 0;
----------------------------------------------------------------------------------

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V