[php-maint] Bug#540024: libapache2-mod-php5: Ignores sendmail_from configuration value

Ondrej Kunc ondra at czol.eu
Wed Aug 5 08:41:02 UTC 2009

Package: libapache2-mod-php5
Version: 5.2.6.dfsg.1-1+lenny3
Severity: normal

Hi, I've just worked with apache and php5 settings and i discovered that if I set sendmail_from value via virtualhost config (php_admin_value sendmail_from ondra at czol.eu), this 

        $to = "ondra at czol.eu";
        $subject = "Hi!";
        $body = "Hi,\n\nHow are you?";
        if (mail($to, $subject, $body)) {
                echo("<p>Message successfully sent!</p>");
        } else {
                echo("<p>Message delivery failed...</p>");

Message delivers as, as you can see, From header is set to www-data at kunco-nb.cz-hosting.com. If I use additional header From: when invoking mail() it works correctly, so problem is in php itself. 

Return-Path: <www-data at kunco-nb.cz-hosting.com>
Delivered-To: ondra at czol.eu
Received: from localhost (localhost [])
	by mail.cz-hosting.com (Postfix) with ESMTP id 7025310807C
	for <ondra at czol.eu>; Wed,  5 Aug 2009 10:15:33 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.cz-hosting.com
Received: from mail.cz-hosting.com ([])
	by localhost (mail.cz-hosting.com []) (amavisd-new, port 10024)
	with ESMTP id 12BN9MZMIUOY for <ondra at czol.eu>;
	Wed,  5 Aug 2009 10:15:32 +0200 (CEST)
Received: from kunco-nb.local (unknown [])
	by mail.cz-hosting.com (Postfix) with ESMTP id 3F89010807B
	for <ondra at czol.eu>; Wed,  5 Aug 2009 10:15:32 +0200 (CEST)
Received: by kunco-nb.local (Postfix, from userid 33)
	id 7BDB147B07; Wed,  5 Aug 2009 10:15:26 +0200 (CEST)
To: ondra at czol.eu
Subject: Hi!
Message-Id: <20090805081526.7BDB147B07 at kunco-nb.local>
Date: Wed,  5 Aug 2009 10:15:26 +0200 (CEST)
From: www-data at kunco-nb.cz-hosting.com (www-data)


How are you?

--- this is end of message source code ---

Thanks for reading, may be fixing this bug.

Ondřej Kunc

-- System Information:
Debian Release: 5.0.2
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libapache2-mod-php5 depends on:
ii  apache2-mpm-pre 2.2.9-10+lenny4          Apache HTTP Server - traditional n
ii  apache2.2-commo 2.2.9-10+lenny4          Apache HTTP Server common files
ii  libbz2-1.0      1.0.5-1                  high-quality block-sorting file co
ii  libc6           2.7-18                   GNU C Library: Shared libraries
ii  libcomerr2      1.41.3-1                 common error description library
ii  libdb4.6        4.6.21-11                Berkeley v4.6 Database Libraries [
ii  libkrb53        1.6.dfsg.4~beta1-5lenny1 MIT Kerberos runtime libraries
ii  libmagic1       4.26-1                   File type determination library us
ii  libpcre3        7.6-2.1                  Perl 5 Compatible Regular Expressi
ii  libssl0.9.8     0.9.8g-15+lenny1         SSL shared libraries
ii  libxml2         2.6.32.dfsg-5            GNOME XML library
ii  mime-support    3.44-1                   MIME files 'mime.types' & 'mailcap
ii  php5-common     5.2.6.dfsg.1-1+lenny3    Common files for packages built fr
ii  tzdata          2009g-0lenny1            time zone and daylight-saving time
ii  ucf             3.0016                   Update Configuration File: preserv
ii  zlib1g          1:        compression library - runtime

libapache2-mod-php5 recommends no packages.

Versions of packages libapache2-mod-php5 suggests:
pn  php-pear                      <none>     (no description available)

-- no debconf information

More information about the pkg-php-maint mailing list