<?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>systemBash &#187; Perl</title>
	<atom:link href="http://systembash.com/tags/code-samples/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Fri, 13 Jan 2012 03:18:25 +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>Lyris Listmanager &#8211; Hacking the Web Frontend For Increased Functionality</title>
		<link>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/</link>
		<comments>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 14:27:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[TCL]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Frontend For Increased Functionality Lyris]]></category>

		<guid isPermaLink="false">http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/</guid>
		<description><![CDATA[Lyris Listmanager is a nice mailing list management system. However, there are a few features that are missing out of the frontend that make it hard to get by your day-to-day office job. Fortunately, most of it is written with TCL routines which are not encoded, which makes for easy updates to this code. Of course this is not supported by Lyris and if you have problems with it after making your changes, don&#8217;t expect them to support it. Make backup of your files &#8211; in Linux this is /usr/local/lm For this example, I&#8217;m going to add the Full Name field to survey results. By default, it shows the email address but not the name of the responding user. Step 1: Backup! 1cp -R /usr/local/lm /usr/local/lm.bak Step 2: Open the file which holds the routine for the &#8220;Survey Details&#8221; page. This is in /htdocs/reports/surveys/.tml 1vi /usr/local/lm/htdocs/reports/surveys/.tml Step 3: Modify the....]]></description>
			<content:encoded><![CDATA[<p>Lyris Listmanager is a nice mailing list management system. However, there are a few features that are missing out of the frontend that make it hard to get by your day-to-day office job. Fortunately, most of it is written with TCL routines which are not encoded, which makes for easy updates to this code. </p>
<p>Of course this is not supported by Lyris and if you have problems with it after making your changes, don&#8217;t expect them to support it. Make backup of your files &#8211; in Linux this is /usr/local/lm</p>
<p>For this example, I&#8217;m going to add the Full Name field to survey results. By default, it shows the email address but not the name of the responding user.</p>
<h2>Step 1:</h2>
<p>Backup!</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp -R /usr/local/lm /usr/local/lm.bak</div></td></tr></tbody></table></div>
<h2>Step 2:</h2>
<p>Open the file which holds the routine for the &#8220;Survey Details&#8221; page. This is in <lyris install location>/htdocs/reports/surveys/.tml</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vi /usr/local/lm/htdocs/reports/surveys/.tml</div></td></tr></tbody></table></div>
<h2>Step 3:</h2>
<p>Modify the code to add in FullName:</p>
<p>In the routine surveyreports::page_all_answers</p>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set sql &quot;SELECT lyrSurveyResponse.WebDocID, lyrSurveyResponseAnswers.ResponseID as ResponseID, lyrSurveyQuestions.UserQuestionNumber, lyrSurveyResponse.ResponseTime, lyrSurveyResponse.MemberID, lyrSurveyResponse.RespondingIP, lyrSurveyResponse.MailingID, lyrSurveyQuestions.QuestionText, lyrSurveyAnswers.AnswerText, lyrSurveyResponseAnswers.FreeFormAnswer, [dbinfo::members_name].[dbinfo::members_emailaddr]<br />
<br />
to<br />
<br />
set sql &quot;SELECT lyrSurveyResponse.WebDocID, lyrSurveyResponseAnswers.ResponseID as ResponseID, lyrSurveyQuestions.UserQuestionNumber, lyrSurveyResponse.ResponseTime, lyrSurveyResponse.MemberID, lyrSurveyResponse.RespondingIP, lyrSurveyResponse.MailingID, lyrSurveyQuestions.QuestionText, lyrSurveyAnswers.AnswerText, lyrSurveyResponseAnswers.FreeFormAnswer, [dbinfo::members_name].[dbinfo::members_emailaddr] as EmailAddr, members_.fullname_ as FullName</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array set heading_labels &quot;AnswerText {Answer} ResponseTime {Date} QuestionText {Question} EmailAddr {Email Address}&quot;<br />
<br />
to<br />
<br />
array set heading_labels &quot;AnswerText {Answer} ResponseTime {Date} QuestionText {Question} FullName {Full Name} EmailAddr {Email Address}&quot;</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array set column_width &quot;ResponseTime 15 QuestionText 25 AnswerText 25 EmailAddr 25 Action_ 10&quot;<br />
<br />
to<br />
<br />
array set column_width &quot;ResponseTime 15 QuestionText 25 AnswerText 10 FullName 15 EmailAddr 25 Action_ 10&quot;</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set sortable {QuestionText AnswerText ResponseTime EmailAddr RespondingIP}<br />
<br />
to<br />
<br />
set sortable {QuestionText AnswerText ResponseTime FullName EmailAddr RespondingIP}</div></td></tr></tbody></table></div>
<p>Save this file and that is it! You will now have full names in your survey responses.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change your default CPAN mirror</title>
		<link>http://systembash.com/content/change-or-remove-cpan-mirror/</link>
		<comments>http://systembash.com/content/change-or-remove-cpan-mirror/#comments</comments>
		<pubDate>Thu, 19 Oct 2006 14:39:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Configurations]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://systembash.com/content/change-or-remove-cpan-mirror/</guid>
		<description><![CDATA[Changing your cpan mirror. Although it seems like it would be easy task to accomplish, it seems there is no easy way to change the perl CPAN module mirror list. I have only found two ways to do this. The first way I found is to modify your Config.pm in the CPAN module. In my install, it is located at /usr/lib/perl5/5.8.5/CPAN/Config.pm. Look for &#8216;urllist&#8217; and you will see the list of mirrors. Modify this variable to change where CPAN looks for its modules. The second way is to re-run the CPAN configuration. You do this by running the cpan command line: 1perl -MCPAN -e shell and then running o conf init 1cpan&#62; o conf init This will run the initial configuration of CPAN again. It seems like there should be an easier way to do this &#8211; if anyone knows please post a comment!]]></description>
			<content:encoded><![CDATA[<p>Changing your cpan mirror.</p>
<p>Although it seems like it would be easy task to accomplish, it seems there is no easy way to change the perl CPAN module mirror list. I have only found two ways to do this.</p>
<p>The first way I found is to modify your Config.pm in the CPAN module. In my install, it is located at /usr/lib/perl5/5.8.5/CPAN/Config.pm. Look for &#8216;urllist&#8217; and you will see the list of mirrors. Modify this variable to change where CPAN looks for its modules.</p>
<p>The second way is to re-run the CPAN configuration. You do this by running the cpan command line:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">perl -MCPAN -e shell</div></td></tr></tbody></table></div>
<p>and then running o conf init</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cpan&gt; o conf init</div></td></tr></tbody></table></div>
<p>This will run the initial configuration of CPAN again.</p>
<p>It seems like there should be an easier way to do this &#8211; if anyone knows please post a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/change-or-remove-cpan-mirror/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Postfix as a proxy to Exchange server</title>
		<link>http://systembash.com/content/postfix-exchange-users-relay/</link>
		<comments>http://systembash.com/content/postfix-exchange-users-relay/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 19:11:55 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Chris Covington]]></category>
		<category><![CDATA[exchange server postfix server]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[open source mail server]]></category>

		<guid isPermaLink="false">http://systembash.com/content/postfix-exchange-users-relay/</guid>
		<description><![CDATA[More and more people seem to be using an open source mail server on linux, such as Postfix, to proxy e-mails coming in from the net and relaying them to their exchange server. I know I&#8217;ve had this type of setup since January and it has been working really well for me. It gives you the ability to do advanced spam and antivirus filtering on messages, while keeping the easy to use GUI interface for creating exchange mailboxes. When will we get a great e-mail client so we can finally ditch the Exchange/Outlook setup that most businesses rely on? I know I haven&#8217;t found a solution that comes close (I&#8217;m sorry, Evolution for Win32 needs to come a bit further, and Thunderbird isn&#8217;t even close). Anyway, once you have this system set up (there are some great instructions here, maybe I will cover this more another day), you may wish....]]></description>
			<content:encoded><![CDATA[<p>More and more people seem to be using an open source mail server on linux, such as <a href="http://www.postfix.org/">Postfix</a>, to proxy e-mails coming in from the net and relaying them to their exchange server. I know I&#8217;ve had this type of setup since January and it has been working really well for me. It gives you the ability to do advanced spam and antivirus filtering on messages, while keeping the easy to use GUI interface for creating exchange mailboxes.  When will we get a great e-mail client so we can finally ditch the Exchange/Outlook setup that most businesses rely on? I know I haven&#8217;t found a solution that comes close (I&#8217;m sorry, <a href="http://shellter.sourceforge.net/evolution/">Evolution for Win32</a> needs to come a bit further, and Thunderbird isn&#8217;t even close).</p>
<p>Anyway, once you have this system set up (there are some great instructions <a href="http://wilsonet.com/mailfilter/">here</a>, maybe I will cover this more another day), you may wish to sync up your Exchange users with your postfix &#8220;relay users&#8221; in order to trash messages coming in who are not addressed to anyone on the Exchange server. This will free up CPU cycles on the exchange server postfix server, and also reduce some bandwidth. Fortunately, Exchange 2000 and beyond use LDAP to publish this information. You can use Perl&#8217;s <a href="http://search.cpan.org/~gbarr/perl-ldap-0.33/">Net::LDAP</a> module to grab this information. Chris Covington put together this <a href="http://www-personal.umich.edu/~malth/gaptuning/postfix/">nice script</a> to grab the Exchange users and post to a file, which can then be postmapped and used in relay_recipient_maps. I hope you find it as useful as I did! [<a href="http://systembash.com/scripts/getadsmtp.txt">Local Mirror of the Script</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/postfix-exchange-users-relay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/23 queries in 0.009 seconds using disk: basic

Served from: systembash.com @ 2012-02-07 03:30:20 -->
