<?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>Tequila Fish &#187; phpList</title>
	<atom:link href="http://www.tequilafish.com/category/tech/phplist/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tequilafish.com</link>
	<description>Ran-dumb ramblings of me...</description>
	<lastBuildDate>Wed, 28 Jul 2010 02:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>phpList with crontab: Permission denied.</title>
		<link>http://www.tequilafish.com/2006/03/14/phplist-with-crontab-permission-denied/</link>
		<comments>http://www.tequilafish.com/2006/03/14/phplist-with-crontab-permission-denied/#comments</comments>
		<pubDate>Tue, 14 Mar 2006 22:01:01 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2006/03/14/phplist-with-crontab-permission-denied/</guid>
		<description><![CDATA[When processing your phpList queue with a crontab, you may get the following error: bash: /home/yourname/phplist: Permission denied This happens if your phplist script is not executable. It is an easy fix. Simply make the phplist script executable and it will run as expected: chmod u+x /home/yourname/phplist]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F03%2F14%2Fphplist-with-crontab-permission-denied%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F03%2F14%2Fphplist-with-crontab-permission-denied%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When processing your phpList queue with a crontab, you may get the following error:<br />
<code>bash: /home/yourname/phplist: Permission denied</code><br />
This happens if your phplist script is not executable.  It is an easy fix.  Simply make the phplist script executable and it will run as expected:<br />
<code>chmod u+x /home/yourname/phplist</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2006/03/14/phplist-with-crontab-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpList: processing with cron &amp; bash script: &#8220;Command not found.&#8221;</title>
		<link>http://www.tequilafish.com/2006/01/27/phplist-processing-with-cron-bash-script-command-not-found/</link>
		<comments>http://www.tequilafish.com/2006/01/27/phplist-processing-with-cron-bash-script-command-not-found/#comments</comments>
		<pubDate>Sat, 28 Jan 2006 00:34:31 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2006/01/27/phplist-processing-with-cron-bash-script-command-not-found/</guid>
		<description><![CDATA[If you are trying to process your phpList queue using a crontab, you will have to set up the phplist script provided in the bin directory to work with your system. It looks like this: #!/bin/bash# script to run PHPlist from commandline. You may need to edit this to make it work # with your [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F01%2F27%2Fphplist-processing-with-cron-bash-script-command-not-found%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2006%2F01%2F27%2Fphplist-processing-with-cron-bash-script-command-not-found%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you are trying to process your phpList queue using a crontab, you will have to set up the <tt>phplist</tt> script provided in the <tt>bin</tt> directory to work with your system.  It looks like this:<br />
<code>#!/bin/bash# script to run PHPlist from commandline. You may need to edit this to make it work<br />
# with your shell environment. The following should work for Bash# in commandline mode, access is restricted to users who are listed in the config file<br />
# check README.commandline for more info# identify the config file for your installation<br />
CONFIG=/home/website/public_html/lists/config/config.php<br />
export CONFIG# alternatively you can use -c on the commandline# run the PHPlist index file with all parameters passed to this script<br />
/usr/bin/php /home/website/public_html/lists/admin/index.php $*</code><br />
Of course you will want to modify all the paths to fit your phpList install.  Most importantly, however, is to not forget to modify the FIRST line if need be.  Otherwise, if your bash interpreter exists elsewhere, when your try to execute your script you will get the following error:<br />
<code>/path/to/phplist: Command not found.</code><br />
For the majority of the installations out there, <tt>/bin/bash</tt> should be fine, however on some systems you may need to edit this to point to where your bash interpreter is installed.  In my case, I had to change it to <tt>/usr/local/bin/bash</tt>.</p>
<p>To future-proof my changes, I also symlinked to where my bash existed:<br />
<code>ln -s /usr/local/bin/bash /bin/bash</code><br />
That way I will not have to re-edit new versions of the <tt>phplist</tt> script in future phpList upgrades.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2006/01/27/phplist-processing-with-cron-bash-script-command-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpList/Sendmail/Linux: X-Authentication-Warning</title>
		<link>http://www.tequilafish.com/2005/11/18/phplistsendmaillinux-x-authentication-warning/</link>
		<comments>http://www.tequilafish.com/2005/11/18/phplistsendmaillinux-x-authentication-warning/#comments</comments>
		<pubDate>Fri, 18 Nov 2005 20:35:04 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Postfix/Sendmail]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[x-authentication-warning]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2005/11/18/phplistsendmaillinux-x-authentication-warning/</guid>
		<description><![CDATA[As a follow-up to my post on getting rid of the X-Authentication-Warning error when using phpList on FreeBSD, here's how to do the same in Linux. Open up /etc/mail/trusted-users in your favorite editor, and add both the user that your Apache is running under, as well as any usernames which are processing phpList queues and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F11%2F18%2Fphplistsendmaillinux-x-authentication-warning%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F11%2F18%2Fphplistsendmaillinux-x-authentication-warning%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As a follow-up to my post on <a href="http://www.tequilafish.com/2005/06/30/phplistsendmailfreebsd-x-authentication-warning/">getting rid of the X-Authentication-Warning error when using phpList on FreeBSD</a>, here's how to do the same in Linux.</p>
<p>Open up <strong><tt>/etc/mail/trusted-users</tt></strong> in your favorite editor, and add both the user that your Apache is running under, as well as any usernames which are processing phpList queues and bounces via crontab.  For example, your trusted-users file should look like this:<br />
<code>httpd<br />
yourusername</code><br />
Save &#038; Exit.  Restart sendmail with the following command:<br />
<code>/etc/init.d/sendmail restart</code><br />
Now when you send mail with phpList, the headers won't contain <tt>X-Authentication-Warning</tt>s.</p>
<p>One security drawback that you should be aware of: Any user on your system can now use PHP to send email with "forged" headers. You basically just gave everyone on your system "Trusted User" status to Sendmail, so be sure that you trust your users before actually doing this!</p>
<p>See how to <a href="http://www.tequilafish.com/2005/06/30/phplistsendmailfreebsd-x-authentication-warning/">do this on FreeBSD</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2005/11/18/phplistsendmaillinux-x-authentication-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpList with crontab: USER environment variable is not defined</title>
		<link>http://www.tequilafish.com/2005/11/17/phplist-with-crontab-user-environment-variable-is-not-defined/</link>
		<comments>http://www.tequilafish.com/2005/11/17/phplist-with-crontab-user-environment-variable-is-not-defined/#comments</comments>
		<pubDate>Fri, 18 Nov 2005 00:58:20 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/2005/11/17/phplist-with-crontab-user-environment-variable-is-not-defined/</guid>
		<description><![CDATA[When trying to automate processing of the mail queue and/or bounces in phpList, I came across the following error when calling the phplist command line script from a crontab: Error: USER environment variable is not defined, cannot do access check. Please make sure USER is defined. This happens because when a crontab executes, the $USER [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F11%2F17%2Fphplist-with-crontab-user-environment-variable-is-not-defined%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F11%2F17%2Fphplist-with-crontab-user-environment-variable-is-not-defined%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When trying to automate processing of the mail queue and/or bounces in <a href="http://www.phplist.com/">phpList</a>, I came across the following error when calling the phplist command line script from a crontab:<br />
<code>Error: USER environment variable is not defined, cannot do access check. Please make sure USER is defined.</code><br />
This happens because when a crontab executes, the <strong><tt>$USER</tt></strong> variable is not set.  We must set it in our script.  So open up the phplist file and add the following:<br />
<code>USER=youusername<br />
export USER</code><br />
The entire file should now look like this:<br />
<code>CONFIG=/path/to/phplist/config/config.php<br />
export CONFIGUSER=yourusername<br />
export USER/path/to/php /home/yourusername/path/to/phplist/admin/index.php $*</code><br />
Note that you also must set the <strong><tt>$commandline_users</tt></strong> variable in your <strong><tt>config/config.php</tt></strong>:<br />
<code>$commandline_users = array("yourusername");</code><br />
With all of that in place, you can automate your queue and bounce processing with a crontab like this (adjust your paths accordingly):<br />
<code># Suppress crontab emails<br />
MAILTO=""<br />
# Process phplist queue daily, every half hour<br />
0,30 * * * * /home/yourusername/phplist -pprocessqueue<br />
# Process phplist bounces once a day, 5am<br />
0 5 * * * /home/yourusername/phplist -pprocessbounces</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2005/11/17/phplist-with-crontab-user-environment-variable-is-not-defined/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phplist/Sendmail/FreeBSD: X-Authentication-Warning</title>
		<link>http://www.tequilafish.com/2005/06/30/phplistsendmailfreebsd-x-authentication-warning/</link>
		<comments>http://www.tequilafish.com/2005/06/30/phplistsendmailfreebsd-x-authentication-warning/#comments</comments>
		<pubDate>Fri, 01 Jul 2005 01:40:59 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Postfix/Sendmail]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[x-authentication-warning]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=14</guid>
		<description><![CDATA[If you enable the $message_envelope variable in the config.php file of phplist for processing bounces, sendmail will probably complain with the following header in your email: X-Authentication-Warning: your.domain.com: httpd set sender to account@domain.com using -f This is because only "trusted users" are allowed to change the message envelope. By default, sendmail only considers root, daemon, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F06%2F30%2Fphplistsendmailfreebsd-x-authentication-warning%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F06%2F30%2Fphplistsendmailfreebsd-x-authentication-warning%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you enable the <tt>$message_envelope</tt> variable in the <tt>config.php</tt> file of phplist for processing bounces, sendmail will probably complain with the following header in your email:<br />
<code>X-Authentication-Warning: your.domain.com: httpd set sender to account@domain.com using -f</code><br />
This is because only "trusted users" are allowed to change the message envelope.  By default, sendmail only considers root, daemon, and uucp as trusted users, so if you try changing the message envelope as the user Apache is running under (in my case httpd) sendmail will attach that nasty warning header to all your outgoing mails.  Spam blockers don't like this!</p>
<p>There are a couple of ways to fix this:</p>
<ol>
<li>Add httpd (or whatever user Apache is running under) to the daemon group:<br />
<code>pw groupmod daemon -M httpd</code>
</li>
<li>Add httpd (or whatever user Apache is running under) to Sendmail's trusted-users file.  Open up <strong><tt>/etc/mail/your.domain.com.submit.mc</tt></strong> in vi and insert the following line:<br />
<code>FEATURE(`use_ct_file') dnl  # Trusted users</code><br />
Save &#038; Exit.<br />
Now you must create the <tt>trusted-users</tt> file in <tt>/etc/mail</tt>:<br />
<code>touch /etc/mail/trusted-users</code><br />
Open <strong><tt>/etc/mail/trusted-users</tt></strong> with vi and on one line simply add the name of the user under which Apache is running:<br />
<code>httpd</code><br />
Save &#038; Exit.  Run the following commands in <strong><tt>/etc/mail</tt></strong> to commit the changes to Sendmail and restart the server:<br />
<code>make install<br />
make restart</code>
</li>
</ol>
<p>That's it, you should be good to go.  Mail sent via PHP/Apache will no longer contain the <tt>X-Authentication-Warning</tt> header.</p>
<p>Note that there is a downside to this.  Any user on your system can now use PHP to send email with "forged" headers.  You basically just gave everyone on your system "Trusted User" status to Sendmail, so be sure that you trust your users before actually doing this!</p>
<p><strong>UPDATE:</strong> <a href="http://www.tequilafish.com/2005/11/18/phplistsendmaillinux-x-authentication-warning/">How to do the same in Linux</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2005/06/30/phplistsendmailfreebsd-x-authentication-warning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phplist: Command not found / Bad interpreter</title>
		<link>http://www.tequilafish.com/2005/06/29/phplist-command-not-found-bad-interpreter/</link>
		<comments>http://www.tequilafish.com/2005/06/29/phplist-command-not-found-bad-interpreter/#comments</comments>
		<pubDate>Thu, 30 Jun 2005 07:06:20 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[phpList]]></category>

		<guid isPermaLink="false">http://www.tequilafish.com/?p=13</guid>
		<description><![CDATA[When using the script "phplist" to process queues or bounces on your phplist installation, you may receive the following error: ./phplist: Command not found. This is caused by the file being in the wrong fileformat. You probably edited it on your Windows/Mac machine, uploaded it, and attempted to execute it. In order for this to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F06%2F29%2Fphplist-command-not-found-bad-interpreter%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.tequilafish.com%2F2005%2F06%2F29%2Fphplist-command-not-found-bad-interpreter%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When using the script "<tt>phplist</tt>" to process queues or bounces on your <a href="http://tincan.co.uk/phplist">phplist</a> installation, you may receive the following error:<br />
<code>./phplist: Command not found.</code><br />
This is caused by the file being in the wrong fileformat.  You probably edited it on your Windows/Mac machine, uploaded it, and attempted to execute it.  In order for this to work, the file must be in UNIX file format.  To fix, open the file with vi ("<tt>vi phplist</tt>") and type the following command:<br />
<code>: set ff=unix</code><br />
Save, and exit, and your phplist should work as expected.</p>
<p>If you get the following error:<br />
<code>/bin/bash: bad interpreter: No such file or directory</code><br />
That is because you either don't have bash installed, or if you do, it's in a different location.  The first line of the phplist script ("<tt>#!/bin/bash</tt>") must point to where your bash is installed.  Find it with "<tt>whereis bash</tt>" or "<tt>find / -name bash</tt>", edit the first line of the phplist script to match, and you should be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tequilafish.com/2005/06/29/phplist-command-not-found-bad-interpreter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
