[milters] Archive

Lists Index Date Thread Search

Article: 781
From: Anthony Howe
Date: 2005-12-27 07:38:24 -0500
Subject: Re: milter_cli again

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Sergey N. Romanov wrote:
> 3. libsnert configured with
> 
> ./configure --prefix=/usr/local/snert \
>              --enable-shared \
>              --disable-static \

LibeSnert has NEVER been tested or built as a shared library. Can't say 
what effect this might have.

>              --disable-debug \
>              --with-db=/usr/local/bdb
> 
> CFLAGS=-mtune=i686 -march=i686 -O2
> 
> 4. milter_cli configured with
> 
> ./configure --prefix=/usr/local/snert \
>              --disable-debug \
>              --enable-pid=/var/run/milter/milter-cli.pid \
>              --enable-socket=/var/run/milter/milter-cli.socket
> 
> CFLAGS=-mtune=i686 -march=i686 -O2
> 
> 5. rc script with flags "-e /usr/local/bin/milter-cli.pl -c /usr/bin/true"
> 
> After simple test like "mail xxx@xxx.xxx" looks log files
> 
> mail.err
> 21:39:39 [13] milter-cli[2408]: 00001 jBQKdPIR002418: write error to 
> child=2424: Broken pipe (32)
> 
> mail.info
> 
> 21:39:39 [16] milter-cli[2408]: 00001 jBQKdPIR002418: started 
> milter-cli.pl[2423] /usr/local/bin/milter-cli.pl
> 21:39:39 [16] milter-cli[2408]: 00001 jBQKdPIR002418: 
> milter-cli.pl[2423] exit status=0
> 21:39:39 [16] sm-mta[2418]: jBQKdPIR002418: from=<root@innter.net>, 
> size=356, class=0, nrcpts=1, 
> msgid=<200512262039.jBQKdPTk002417@belos.innter.net>, proto=ESMTP, 
> daemon=Daemon0, relay=localhost.innter.net [127.0.0.1]
> 21:39:39 [16] milter-cli[2408]: 00001 jBQKdPIR002418: started true[2424] 
> /usr/bin/true
> 
> I can't see message with "exit status" like for milter-cli.pl

I really dislike separating log file error messages, more confusing.

 > 21:39:39 [13] milter-cli[2408]: 00001 jBQKdPIR002418: write error to
 > child=2424: Broken pipe (32)

There is no exit status because "true" pid 2424 broke the pipe at some 
point.

> Now if to run top or ps I will see zombie process and amount is 
> increased after each email. They disappear only after I stop milter_cli.

Hmm. Looking at the code, I don't do a waitpid() after error conditions 
assuming that the process has gone away.

> I'm sure problem is really not in milter_cli but in "true" (may be only 
> on FreeBSD). May be because true do not accept input or exits with 

I doubt "true" does anything wrong. Its probably the simple fact that 
you're doing something I did not expect, which was to use a program that 
did not read standard input.

So by using "true", it generates a pipe error and exits normally, 
instead of generating an error and going away as assumed.

I'll see what I can do for this. It probably just a simple matter of 
doing waitpid() even after an I/O error and discarding the result.

-- 
Anthony C Howe                                 +33 6 11 89 73 78
http://www.snert.com/       ICQ:
7116561         AIM: Sir Wumpus

Sendmail Anti-Spam Solutions           http://www.snertsoft.com/
                                             We Serve Your Server

Lists Index Date Thread Search