[milters] Archive

Lists Index Date Thread Search

Article: 780
From: Sergey N. Romanov
Date: 2005-12-26 16:42:28 -0500
Subject: milter_cli again

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

Hello,

Question again... But I think this is not a question but a problem.

I have :

1. FreeBSD 5.4
2. sendmail 8.13.5 with site.config

APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL=2')
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS')
APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1')
APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_SSL')
APPENDDEF(`conf_sendmail_ENVDEF', `-DLDAPMAP')
APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_MILTER=1')

APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER=1')

APPENDDEF(`conf_libsm_ENVDEF', `-DLDAPMAP')

APPENDDEF(`confENVDEF', `-DSMFI_VERSION=4')

APPENDDEF(`confMAPDEF', `-DSOCKETMAP')
APPENDDEF(`confMAPDEF', `-DLDAPMAP')
APPENDDEF(`confMAPDEF', `-DMAP_REGEX')

3. libsnert configured with

./configure --prefix=/usr/local/snert \
             --enable-shared \
             --disable-static \
             --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

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.

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 
something wrong. When I change "/usr/bin/true" to the same command as in 
-e then all work fine and no zombies. But in fact we would not use -c 
command at all because this is loss of productivity and increase in 
loading of a server. Please note that -c command executed after -e only 
if -e exits with DISCARD and not executed if REJECT. But we want to use 
DISCARD in sone cases.

I have removed -c command execution from sources as temporary solution 
:-) but I will wait for more elegant solution from you :-). Of course if 
this is possible and this have any sense for you.


-- 

Best regards,
Sergey N. Romanov

Lists Index Date Thread Search