<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris JeanChris Jean &#187; Sendmail</title>
	<atom:link href="http://chrisjean.com/tag/sendmail/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:22:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>smrsh: &#8220;php&#8221; not available for sendmail programs (stat failed)</title>
		<link>http://chrisjean.com/2009/01/07/smrsh-php-not-available-for-sendmail-programs-stat-failed/</link>
		<comments>http://chrisjean.com/2009/01/07/smrsh-php-not-available-for-sendmail-programs-stat-failed/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:31:16 +0000</pubDate>
		<dc:creator>Chris Jean</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[bounceback]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[Ubersmith]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=499</guid>
		<description><![CDATA[I had to configure Sendmail in order for Ubersmith to be able to receive support requests via email. Basically, you configure an alias (/etc/aliases) like so: support: "&#124;php -q -f /home/html/cron/gateway.php domain.com 1" This all seemed to be very straightforward. I didn&#8217;t even think to test it until hours later. When I finally did test [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I had to <a href="http://chrisjean.com/2009/01/07/configuring-sendmail-to-receive-external-mail/" target="_blank">configure Sendmail</a> in order for Ubersmith to be able to receive support requests via email. Basically, you configure an alias (/etc/aliases) like so:</p>
<div style="padding-left:30px;"><code>support: "|php -q -f /home/html/cron/gateway.php domain.com 1"</code></div>
<p>This all seemed to be very straightforward. I didn&#8217;t even think to test it until hours later. When I finally did test out the support request by email function, I received this very abrupt rebuke from Sendmail in the form of a bounceback:</p>
<p><span id="more-499"></span></p>
<pre style="padding-left:30px;"> ----- The following addresses had permanent fatal errors -----
"|php -q -f /home/html/cron/gateway.php domain.com 1"
(reason: Service unavailable)
(expanded from: )

----- Transcript of session follows -----
smrsh: "php" not available for sendmail programs (stat failed)
554 5.0.0 Service unavailable</pre>
<p>Not exactly a friendly response.</p>
<p>I dug around a bit and found out that Sendmail places severe limitations on what it has access to. This is actually a good thing since it ensures that you open up possible security holes only if you know what you are doing (or at least think you do).</p>
<p>The solution is to explicitly give permission for Sendmail to not only use PHP but also the gateway.php script. That is done by creating a couple of symbolic links in a special Sendmail folder, <code><strong>/etc/smrsh</strong></code>.</p>
<p>I executed the following code to add these symbolic links:</p>
<div style="padding-left:30px;"><code># ln -s /home/html/cron/gateway.php /etc/smrsh/gateway.php<br />
# ln -s /usr/bin/php /etc/smrsh/php</code></div>
<p>Notice that I had to create one for PHP itself and one for the script that I wanted to run. If you are setting this up for a script of your own, make sure that you adjust the paths for your own specific setup. PHP may be located in another path on your server. You can find the location by running &#8220;<code><strong>which php</strong></code>&#8220;.</p>
<p>After I got this setup, the support emails came in like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/07/smrsh-php-not-available-for-sendmail-programs-stat-failed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configuring Sendmail to Receive External Mail</title>
		<link>http://chrisjean.com/2009/01/07/configuring-sendmail-to-receive-external-mail/</link>
		<comments>http://chrisjean.com/2009/01/07/configuring-sendmail-to-receive-external-mail/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 12:00:29 +0000</pubDate>
		<dc:creator>Chris Jean</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Qmail]]></category>
		<category><![CDATA[Sendmail]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=491</guid>
		<description><![CDATA[I&#8217;m having all sorts of fun playing around with Linux these days, both on my personal systems and on servers. Earlier, I had to configure Sendmail to receive outside mail. I&#8217;ve used larger mail solutions on Linux before, such as Qmail, but I didn&#8217;t need anything near that complex since I just needed to make [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I&#8217;m having all sorts of fun playing around with Linux these days, both on my personal systems and on servers. Earlier, I had to configure <a href="http://www.sendmail.org/" target="_blank">Sendmail</a> to receive outside mail. I&#8217;ve used larger mail solutions on Linux before, such as <a href="http://www.qmail.org/" target="_blank">Qmail</a>, but I didn&#8217;t need anything near that complex since I just needed to make sure that this server could receive specifically routed messages.</p>
<p>When I first started digging around, I couldn&#8217;t even find out how to change any of the settings, but it was clear that the server was only listening on the localhost loopback address. Even my usual solution of googling for answers wasn&#8217;t turning up much. Finally, after searching for about half an hour, I found this <a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers#_Toc109364456" target="_blank">extremely helpful guide</a>, which I will simply direct you to if you wish to get Sendmail configured on your box.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/07/configuring-sendmail-to-receive-external-mail/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

