<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Setup sendmail php mail() support for chrooted Lighttpd or Apache web server</title>
	<atom:link href="http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html</link>
	<description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description>
	<lastBuildDate>Tue, 16 Mar 2010 14:37:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150556</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 07 Sep 2009 21:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150556</guid>
		<description>Also, I find it a bit... beyond silly... that people go through the trouble of setting up a chroot for Apache and then have no problem copying a shell into that chroot.  That&#039;s a great way to provide a potential attacker with a much bigger attack surface....  Mini_sendmail is way overkill...</description>
		<content:encoded><![CDATA[<p>Also, I find it a bit&#8230; beyond silly&#8230; that people go through the trouble of setting up a chroot for Apache and then have no problem copying a shell into that chroot.  That&#8217;s a great way to provide a potential attacker with a much bigger attack surface&#8230;.  Mini_sendmail is way overkill&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150555</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 07 Sep 2009 21:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150555</guid>
		<description>Jonathan -

There&#039;s no need to rebuild it - the necessary functions are included in the original femail distro.  Just open the Makefile and comment out this line:

CFLAGS+= -DHAS_FGETLN -DHAS_STRLCPY

And then run a &#039;make&#039;.  The author included versions of the functions from OBSD&gt;</description>
		<content:encoded><![CDATA[<p>Jonathan -</p>
<p>There&#8217;s no need to rebuild it &#8211; the necessary functions are included in the original femail distro.  Just open the Makefile and comment out this line:</p>
<p>CFLAGS+= -DHAS_FGETLN -DHAS_STRLCPY</p>
<p>And then run a &#8216;make&#8217;.  The author included versions of the functions from OBSD&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Ian R. Medilo</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150147</link>
		<dc:creator>John Ian R. Medilo</dc:creator>
		<pubDate>Sat, 15 Aug 2009 21:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-150147</guid>
		<description>i can already send email thru send mail to gmail account.. the problem is that i cannot received to my company email... when i use the settings 

# &quot;Smart&quot; relay host (may be null)
DSmyhost.host.com

gmail account cannot received.</description>
		<content:encoded><![CDATA[<p>i can already send email thru send mail to gmail account.. the problem is that i cannot received to my company email&#8230; when i use the settings </p>
<p># &#8220;Smart&#8221; relay host (may be null)<br />
DSmyhost.host.com</p>
<p>gmail account cannot received.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-149087</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Mon, 22 Jun 2009 19:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-149087</guid>
		<description>This step is wrong.

&lt;code&gt;# cp /bin/sh /webroot/bin
# l2chroot /bin/sh&lt;/code&gt;

it should be (I think)
&lt;code&gt;
#mkdir -p /webroot/bin/
#cp /bin/sh /webroot/bin/
#l2chroot /bin/sh&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This step is wrong.</p>
<p><code># cp /bin/sh /webroot/bin<br />
# l2chroot /bin/sh</code></p>
<p>it should be (I think)<br />
<code><br />
#mkdir -p /webroot/bin/<br />
#cp /bin/sh /webroot/bin/<br />
#l2chroot /bin/sh</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-148002</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Mon, 06 Apr 2009 03:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-148002</guid>
		<description>I had the same problem as tomcat when compiling femail on Debian. 

I have patched the femail.c file to include the missing functions it was referencing. You can download the &lt;a href=&quot;http://dump.myxcp.net/linux/femail-0.97.tgz&quot; title=&quot;fixed femail&quot; rel=&quot;nofollow&quot;&gt;fixed femail for debian based linux&lt;/a&gt; &lt; there.</description>
		<content:encoded><![CDATA[<p>I had the same problem as tomcat when compiling femail on Debian. </p>
<p>I have patched the femail.c file to include the missing functions it was referencing. You can download the <a href="http://dump.myxcp.net/linux/femail-0.97.tgz" title="fixed femail" rel="nofollow">fixed femail for debian based linux</a> &lt; there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robyn</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144440</link>
		<dc:creator>Robyn</dc:creator>
		<pubDate>Tue, 22 Jul 2008 08:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144440</guid>
		<description>For my previous post: there&#039;s a fix for mini_sendmail&#039;s recipient handling bug. Patch mini_sendmail.c with the code on this link:

https://dev.openwrt.org/cgi-bin/trac.fcgi/browser/packages/net/mini_sendmail/patches/200-fullname.patch?rev=8530

Bye</description>
		<content:encoded><![CDATA[<p>For my previous post: there&#8217;s a fix for mini_sendmail&#8217;s recipient handling bug. Patch mini_sendmail.c with the code on this link:</p>
<p><a href="https://dev.openwrt.org/cgi-bin/trac.fcgi/browser/packages/net/mini_sendmail/patches/200-fullname.patch?rev=8530" rel="nofollow">https://dev.openwrt.org/cgi-bin/trac.fcgi/browser/packages/net/mini_sendmail/patches/200-fullname.patch?rev=8530</a></p>
<p>Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robyn</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144377</link>
		<dc:creator>Robyn</dc:creator>
		<pubDate>Wed, 16 Jul 2008 14:23:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144377</guid>
		<description>Can somebody please tell me. mail() function now works properly, but when testing with PHPMailer, it fails.

PHPMailer has support to add recipients with the AddAddress($email, $name) function. If I don&#039;t fill the $name variable, mail will be sent normally, but if I fill it, I get this error: 

/usr/sbin/sendmail: unexpected response 501 to RCPT TO command

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Can somebody please tell me. mail() function now works properly, but when testing with PHPMailer, it fails.</p>
<p>PHPMailer has support to add recipients with the AddAddress($email, $name) function. If I don&#8217;t fill the $name variable, mail will be sent normally, but if I fill it, I get this error: </p>
<p>/usr/sbin/sendmail: unexpected response 501 to RCPT TO command</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pero</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144025</link>
		<dc:creator>pero</dc:creator>
		<pubDate>Tue, 10 Jun 2008 11:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-144025</guid>
		<description>We have multiple chrooted apaches running with different user rights, so username = “www-data”; is not a solution for the problem!

In this case you have to copy the libc6 libraries into to jail!

After that getlogin() will work, if you have the apache user in /chrootdir/etc/passwd</description>
		<content:encoded><![CDATA[<p>We have multiple chrooted apaches running with different user rights, so username = “www-data”; is not a solution for the problem!</p>
<p>In this case you have to copy the libc6 libraries into to jail!</p>
<p>After that getlogin() will work, if you have the apache user in /chrootdir/etc/passwd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-142019</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Fri, 30 Nov 2007 11:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-142019</guid>
		<description>Is it possible to add mail() support to an existing php install that wasn&#039;t compiled with access to sendmail without re-compiling? For example adding a module?</description>
		<content:encoded><![CDATA[<p>Is it possible to add mail() support to an existing php install that wasn&#8217;t compiled with access to sendmail without re-compiling? For example adding a module?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gnif</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141880</link>
		<dc:creator>gnif</dc:creator>
		<pubDate>Sun, 18 Nov 2007 04:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141880</guid>
		<description>A few things that arn&#039;t clear here. If you are running inside a chroot, and using suEXEC or suPHP, you must make sure that /bin/sh, and sendmail are executable bu the user.

If you are using virtual users, you must make the modification to mini_senmail by evilghost

&lt;code&gt;/* username = getlogin(); */
username = “www-data”;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>A few things that arn&#8217;t clear here. If you are running inside a chroot, and using suEXEC or suPHP, you must make sure that /bin/sh, and sendmail are executable bu the user.</p>
<p>If you are using virtual users, you must make the modification to mini_senmail by evilghost</p>
<p><code>/* username = getlogin(); */<br />
username = “www-data”;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yudai</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141654</link>
		<dc:creator>yudai</dc:creator>
		<pubDate>Fri, 09 Nov 2007 12:56:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141654</guid>
		<description>Whenever I try the test php, I get the following error in ssh:
/bin/sendmail: unexpected response 550 to RCPT TO command
What am I doing wrong here?</description>
		<content:encoded><![CDATA[<p>Whenever I try the test php, I get the following error in ssh:<br />
/bin/sendmail: unexpected response 550 to RCPT TO command<br />
What am I doing wrong here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: evilghost</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141000</link>
		<dc:creator>evilghost</dc:creator>
		<pubDate>Tue, 04 Sep 2007 13:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-141000</guid>
		<description>Users having issues with the &quot;can&#039;t determine username&quot; error message can modify the source code and re-run make.  I&#039;ve been able to successfully do this without playing with /etc/passwd by manually specifying the user and bypassing the getlogin() function.

/* username = getlogin(); */
username = &quot;www-data&quot;;</description>
		<content:encoded><![CDATA[<p>Users having issues with the &#8220;can&#8217;t determine username&#8221; error message can modify the source code and re-run make.  I&#8217;ve been able to successfully do this without playing with /etc/passwd by manually specifying the user and bypassing the getlogin() function.</p>
<p>/* username = getlogin(); */<br />
username = &#8220;www-data&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomcat</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-140883</link>
		<dc:creator>tomcat</dc:creator>
		<pubDate>Wed, 22 Aug 2007 22:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-140883</guid>
		<description>Hi i have also an problem :(
If i execute the testmail php file als root 
./php /webroot/home/lighttpd/tmail.php
it works fine but if i test it using lighttpd it doesnt work.
I got no errormessages in log but i think its this problem: /usr/sbin/sendmail: can’t determine username.
I try to add sendmail user to /webroot/etc/passwd file, sendmail:x:65002:108::/home/sendmail:/sbin/nologin
but it dont work 
When i change ‘username = getlogin();’ to ‘username = “www-data”; in mini_sendmail.c i got compile error :(
When i write username = &#039;www-data&#039; i can compile but it dosnt work over my Webserver only als root ./php /webroot/home/lighttpd/tmail.php :((
I also try femail but there i get this error:
cc  femail.o openbsd_compat.o  -o femail
femail.o(.text+0x570): In function `build_from&#039;:
: undefined reference to `strlcpy&#039;
femail.o(.text+0x61b): In function `build_from&#039;:
: undefined reference to `strlcpy&#039;
femail.o(.text+0x665): In function `parse_message&#039;:
: undefined reference to `fgetln&#039;
femail.o(.text+0x12e7): In function `read_reply&#039;:
: undefined reference to `strlcpy&#039;
femail.o(.text+0x17ac): In function `parse_config&#039;:
: undefined reference to `fgetln&#039;
femail.o(.text+0x1953): In function `parse_config&#039;:
: undefined reference to `strlcpy&#039;
femail.o(.text+0x1b03): In function `next_token&#039;:
: undefined reference to `strlcpy&#039;
collect2: ld returned 1 exit status
make: *** [femail] Error 1

Please help me</description>
		<content:encoded><![CDATA[<p>Hi i have also an problem :(<br />
If i execute the testmail php file als root<br />
./php /webroot/home/lighttpd/tmail.php<br />
it works fine but if i test it using lighttpd it doesnt work.<br />
I got no errormessages in log but i think its this problem: /usr/sbin/sendmail: can’t determine username.<br />
I try to add sendmail user to /webroot/etc/passwd file, sendmail:x:65002:108::/home/sendmail:/sbin/nologin<br />
but it dont work<br />
When i change ‘username = getlogin();’ to ‘username = “www-data”; in mini_sendmail.c i got compile error :(<br />
When i write username = &#8216;www-data&#8217; i can compile but it dosnt work over my Webserver only als root ./php /webroot/home/lighttpd/tmail.php :((<br />
I also try femail but there i get this error:<br />
cc  femail.o openbsd_compat.o  -o femail<br />
femail.o(.text+0&#215;570): In function `build_from&#8217;:<br />
: undefined reference to `strlcpy&#8217;<br />
femail.o(.text+0&#215;61b): In function `build_from&#8217;:<br />
: undefined reference to `strlcpy&#8217;<br />
femail.o(.text+0&#215;665): In function `parse_message&#8217;:<br />
: undefined reference to `fgetln&#8217;<br />
femail.o(.text+0&#215;12e7): In function `read_reply&#8217;:<br />
: undefined reference to `strlcpy&#8217;<br />
femail.o(.text+0&#215;17ac): In function `parse_config&#8217;:<br />
: undefined reference to `fgetln&#8217;<br />
femail.o(.text+0&#215;1953): In function `parse_config&#8217;:<br />
: undefined reference to `strlcpy&#8217;<br />
femail.o(.text+0&#215;1b03): In function `next_token&#8217;:<br />
: undefined reference to `strlcpy&#8217;<br />
collect2: ld returned 1 exit status<br />
make: *** [femail] Error 1</p>
<p>Please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabian</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-140280</link>
		<dc:creator>Fabian</dc:creator>
		<pubDate>Sun, 24 Jun 2007 14:56:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-140280</guid>
		<description>Or just change &#039;username = getlogin();&#039; to &#039;username = &quot;www-data&quot;;&#039; in mini_sendmail.c :)</description>
		<content:encoded><![CDATA[<p>Or just change &#8216;username = getlogin();&#8217; to &#8216;username = &#8220;www-data&#8221;;&#8217; in mini_sendmail.c :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivek</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-126223</link>
		<dc:creator>vivek</dc:creator>
		<pubDate>Sun, 29 Apr 2007 03:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-126223</guid>
		<description>Ah, thanks here is url for femail

http://quigon.bsws.de/femail/</description>
		<content:encoded><![CDATA[<p>Ah, thanks here is url for femail</p>
<p><a href="http://quigon.bsws.de/femail/" rel="nofollow">http://quigon.bsws.de/femail/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boohoo @ mini_sendmail</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-125897</link>
		<dc:creator>boohoo @ mini_sendmail</dc:creator>
		<pubDate>Sat, 28 Apr 2007 17:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-125897</guid>
		<description>Incase anyone else is having the same problem.... try femail instead... much easier :)</description>
		<content:encoded><![CDATA[<p>Incase anyone else is having the same problem&#8230;. try femail instead&#8230; much easier :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nixcraft</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-68227</link>
		<dc:creator>nixcraft</dc:creator>
		<pubDate>Thu, 01 Feb 2007 22:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-68227</guid>
		<description>Jeremie,

Add sendmail user to your /webroot/etc/passwd file</description>
		<content:encoded><![CDATA[<p>Jeremie,</p>
<p>Add sendmail user to your /webroot/etc/passwd file</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremie</title>
		<link>http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-67440</link>
		<dc:creator>jeremie</dc:creator>
		<pubDate>Tue, 30 Jan 2007 22:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/tips/howto-setup-sendmail-php-mail-chrooted-apache-lighttpd.html#comment-67440</guid>
		<description>Hello,

I&#039;ve followed your article in order to setup mini_sendmail on my chroot Apache2 webserver.

Everythings is ok except this error in the apache&#039;s error.log :

/usr/sbin/sendmail: can&#039;t determine username

I&#039;m stuck on this problem, and help would be appreciated !

Best regards,

Jeremie Werner</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I&#8217;ve followed your article in order to setup mini_sendmail on my chroot Apache2 webserver.</p>
<p>Everythings is ok except this error in the apache&#8217;s error.log :</p>
<p>/usr/sbin/sendmail: can&#8217;t determine username</p>
<p>I&#8217;m stuck on this problem, and help would be appreciated !</p>
<p>Best regards,</p>
<p>Jeremie Werner</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.199 seconds -->
