li...@rhsoft.net:
> Hi
> 
> i try to execute postmap like below from a PHP script running on a 
> webserver via passthru() - the temp-file exists and works out from a 
> root shell, but called from the webserver no return or error
> 
> the idea behind is
> 
> * load live ptr-rules via webservice
> * store them in a temp file
> * fire the input against postmap to check matches (FP/FN)
> 
> /usr/sbin/postmap -v -q 'static-164-148-4-96.hardin.tn.ena.net' 
> regexp:/tmp/ptr-filter-temp.cf
> 
> any idea where postmap needs access and probably not have on the 
> restricted webserver and why even with -v no output at all happens?

Good, your PHP engine does not run as root.

To find out what fails, use

    strace -o file.$$ /usr/sbin/postmap...
or
    strace /usr/sbin/postmap...

BTW, regexps in Postfix tables must come from a trusted source.

        Wietse

Reply via email to