php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2940 Sendmail problem
Submitted: 1999-12-09 08:48 UTC Modified: 1999-12-15 14:58 UTC
From: nmmm at nmmm dot nu Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nmmm at nmmm dot nu
New email:
PHP Version: OS:

 

 [1999-12-09 08:48 UTC] nmmm at nmmm dot nu
----- Original Message -----
From: Nikolay Mijaylov <nmmm@nmmm.nu>
To: Andi Gutmans <andi@php.net>; Zeev Suraski <bourbon@netvision.net.il>;
Rasmus Lerdorf <rasmus@lerdorf.on.ca>
Sent: 23 ??????? 1999 ?. 10:36
Subject: PHP Sendmail Feature - FIXED!


> Hi all
> yesterday I found a feature in PHP. It is sendmail-related. If u try to
send
> some like this:
>
> ---------
> mail("to@somewhere", "a subject", "hello\n.\nsir\n");
> --------
>
> the delivered mail will be only:
>
> -----
> from: from@host
> to: to@somewhere
> subject: a subject
>
> hello
> -----
>
> the <dot> reject all lines after it.
> looking at sendmail man page, there are a flag "-i" this mean ignore all
> <dots> and use only <EOF>
>
> The fixing is easy, if u know this.
>
> $ php -v
> 3.0.12
>
> file is "main.c" line is "993"
>
> C code is
> ---------------
> #ifdef PHP_PROG_SENDMAIL
>    /* THIS IS SENDMAIL FEATURE FIX.
>    *  "Nikolay Mijaylov" <nmmm@nmmm.nu>
>    *  Pasing "-i" reject all control <dots> into "sendmail -t"
>    */
>    php3_ini.sendmail_path = PHP_PROG_SENDMAIL " -t -i";
> #else
>    php3_ini.sendmail_path = NULL;
> #endif
> ---------------
>
>
> Greetings
>    Nikolay
>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-09 18:34 UTC] joey at cvs dot php dot net
This is not a PHP bug...this is the proper behavior.

If you don't want it, there is no need to hack the source, just
add -i to "sendmail_path" in your php.ini !

A dot on a line by itself is supposed to terminate the email, and
users should be able to count on that.
 [1999-12-15 14:58 UTC] sas at cvs dot php dot net
Closing this, nothing relevant left.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 01:01:35 2025 UTC