Mail() does not function on FreeBSD and PHP and Qmail or Postfix

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have a problem with the PHP mail() function on a running Qmail
on FreeBSD 5.2.1.  Pretty like this problem, I found in the mail
archive :

Please, can somebody help me out. With this problem and the PHP mail()

OS             : FreeBSD 5.2.1
Mailserver: Qmail
PHP       : 5.0.2 (4.3.9 same error)

Step 1: Testing of the qmail server in shell:

I create a test.eml file with:
Date: Wed, 27 Oct 2004 11:00:37 +0200
To: me2@mydomain.loc
Subject: Local test

I test the mailserver from shell with:
cat test.eml | /var/qmail/bin/qmail-inject      (mail arrives)
cat test.eml | /usr/sbin/sendmail -t -i            (mail arrives)

Step 2: I deinstalled the whole bunch of PHP 4.3.9 with:
pkg_delete -x "php4*"
pkg_delete -x "pecl-*"
rm -d -r /usr/local/lib/php /usr/local/include/php

Step 3: Install minimum PHP system.

cd /usr/ports/lang/php5
make WITH_APACHE=yes PHP_SAPI=full
make WITH_APACHE=yes  PHP_SAPI=full install

Step 4: Configure right php.ini and verify it works

cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini

sendmail_path = /var/qmail/bin/qmail-inject

(note: same behaviour when i use, or I use ; before sendmail)
sendmail_path = /usr/sbin/sendmail -t -i

qmail-inject can be accessed and executed from others.

Write a test.php with

# php -v
PHP 5.0.2 (cli) (built: Oct 31 2004 11:12:24) (DEBUG)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies

(Ok next time i try WITH_DEBUG=no)

#php -m
[PHP Modules]

#php -f test.php | grep sendmail_path
sendmail_path => /var/qmail/bin/qmail-inject =>

(Ok, seems OK)

Step 5: testing mail from PHP

A simple test2.php:

        mail("me@mydomain.loc", "Subjet", "Test mail");

#php -f test2.php

->Same results, the script sits waiting/running whatever.
No core dumped, it just runs and waits...


     /(@ @)\  Greetings from CyBy  

Site Timeline