Hello,

for testing purposes i wrote a policy-service for postfix as a shellscript. My Script is working very well, iam happy with its functionality ;) But unfortunately there is one problem when a lot of mails are incoming. the shellscript just does some grepping in small files etc. and is giving back a allowd result..
My Shellscript is spawned from master.cf like this:

policy-mycheck  unix  -       n       n       -       -       spawn
   user=nobody argv=nice -n 15 /usr/lib/postfix/mycheckscript.sh

When a lot of mails are incoming i got a high number of zombies. as a consequence of this my system load gets really high.
Are there some general methods to avoid this?
to decrease number of zombies now i do a "exit 0" directly after sending my answer to postfix.
as a result oft this now i get postfix warnings in maillog.

warning: premature end-of-input on private/policy-mycheck while reading input attribute name

i do not understand this. script is exiting after sending answer to postfix, why this warning about premature end of input?
also i wonder because this high number of zombies?

does somebody has some advices to avoid my problems? is a shellscript practical to use as policy-service or is only a listening deamon the right way?

Thanks,
Andre

Reply via email to