
<?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>Matt Rude &#187; Technology</title>
	<atom:link href="http://mattrude.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrude.com</link>
	<description>Matt Rude’s Personal Website</description>
	<lastBuildDate>Thu, 15 Jul 2010 15:34:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Display EXIF Data on WordPress Gallery Post Image</title>
		<link>http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/</link>
		<comments>http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 15:34:23 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=2595</guid>
		<description><![CDATA[In this post I will talk about how to display EXIF data for an image in a WordPress post or native gallery. In order to do this you need to modify your sites theme. First start by addign the below function to your themes function.php file. /********************************************************************************* Using WordPress functions to retrieve the extracted EXIF information from database */ function mdr_exif() { ?&#62; &#60;div id="exif"&#62; &#60;h3 class='comment-title exif-title'&#62;&#60;?php _e('Images EXIF Data'); ?&#62;&#60;/h3&#62; &#60;div id="exif-data"&#62; &#60;?php $imgmeta = wp_get_attachment_metadata( $id );...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (22.1772)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (16.3437)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (12.0885)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (10.9088)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (10.4067)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>In this post I will talk about how to display <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format" target="_blank">EXIF</a> data for an image in a WordPress post or native gallery.</p>
<p>In order to do this you need to modify your sites theme.</p>
<p><strong>First start by addign the below function to your themes function.php file.</strong></p>
<pre>/*********************************************************************************
  Using WordPress functions to retrieve the extracted EXIF
  information from database
*/
function mdr_exif() { ?&gt;
  &lt;div id="exif"&gt;
    &lt;h3 class='comment-title exif-title'&gt;&lt;?php _e('Images EXIF Data'); ?&gt;&lt;/h3&gt;
    &lt;div id="exif-data"&gt;
      &lt;?php
      $imgmeta = wp_get_attachment_metadata( $id );
      // Convert the shutter speed retrieve from database to fraction
      $image_shutter_speed = $imgmeta['image_meta']['shutter_speed'];
      if ($image_shutter_speed &gt; 0) {
        if ((1 / $image_shutter_speed) &gt; 1) {
          if ((number_format((1 / $image_shutter_speed), 1)) == 1.3
            or number_format((1 / $image_shutter_speed), 1) == 1.5
            or number_format((1 / $image_shutter_speed), 1) == 1.6
            or number_format((1 / $image_shutter_speed), 1) == 2.5){
            $pshutter = "1/" . number_format((1 / $image_shutter_speed), 1, '.', '') ." ".__('second');
          } else {
            $pshutter = "1/" . number_format((1 / $image_shutter_speed), 0, '.', '') ." ".__('second');
          }
        } else {
          $pshutter = $image_shutter_speed ." ".__('seconds');
        }
      }

      // Start to display EXIF and IPTC data of digital photograph
      echo "&lt;p&gt;" . date("d-M-Y H:i:s", $imgmeta['image_meta']['created_timestamp'])."&lt;/p&gt;";
      echo "&lt;p&gt;" . $imgmeta['image_meta']['camera']."&lt;/p&gt;";
      echo "&lt;p&gt;" . $imgmeta['image_meta']['focal_length']."mm&lt;/p&gt;";
      echo "&lt;p&gt;f/" . $imgmeta['image_meta']['aperture']."&lt;/p&gt;";
      echo "&lt;p&gt;" . $imgmeta['image_meta']['iso']."&lt;/p&gt;";
      echo "&lt;p&gt;" . $pshutter . "&lt;/p&gt;"
      ?&gt;
    &lt;/div&gt;
    &lt;div id="exif-lable"&gt;
      &lt;?php // EXIF Titles
      echo "&lt;p&gt;&lt;span&gt;".__('Date Taken:')."&lt;/span&gt;";
      echo "&lt;p&gt;&lt;span&gt;".__('Camera:')."&lt;/span&gt;";
      echo "&lt;p&gt;&lt;span&gt;".__('Focal Length:')."&lt;/span&gt;";
      echo "&lt;p&gt;&lt;span&gt;".__('Aperture:')."&lt;/span&gt;";
      echo "&lt;p&gt;&lt;span&gt;".__('ISO:')."&lt;/span&gt;";
      echo "&lt;p&gt;&lt;span&gt;".__('Shutter Speed:')."&lt;/span&gt;"; ?&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;?php }</pre>
<p><strong>Then add the following to your style.css</strong></p>
<pre>/*EXIF table*/
#exif { overflow: hidden; margin: 0; padding: 0 10px 0 0; }
#exif-lable { margin: 0 0 0 15px; width: 125px; }
#exif-lable p { margin: 0; }
#exif-lable span { font-weight:bold; }
#exif-data { overflow: hidden; margin: 0; float: right; width: 540px; }
#exif-data p { margin: 0 10px; }</pre>
<p>And lastly you need to add the function you created above to your image.php file.  This may be the most difficult part. Depending on your theme, you need to find a space for the EXIF table to live on the image page.  You will also need to play with the style.css entry you added to make it look correctly on your site.</p>
<pre>&lt;?php mdr_exif(); ?&gt;</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (22.1772)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (16.3437)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (12.0885)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (10.9088)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (10.4067)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Commit eMail Notifications</title>
		<link>http://mattrude.com/2010/05/git-commit-email-notifications/</link>
		<comments>http://mattrude.com/2010/05/git-commit-email-notifications/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:35:31 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=2272</guid>
		<description><![CDATA[Git&#8217;s Native eMail Notifier From the repository you wish to send email on commits. cd .git/hooks mv post-receive post-receive.bkp ln -s /usr/share/git-core/contrib/hooks/post-receive-email post-receive git config hooks.mailinglist "mailinglist@example.com" git config hooks.emailprefix "[SUBJECT PREFIX] " # note the trailing space Git Commit Notifier This &#8216;plugin&#8217; will allow you to send an email every time a commit is committed to the repository. You may use this on the central repository to keep everyone following the project up to date. The source may also...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (13.044)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (10.3207)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (8.15839)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (7.27175)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.9847)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<h2>Git&#8217;s Native eMail Notifier</h2>
<p>From the repository you wish to send email on commits.</p>
<pre>cd .git/hooks
mv post-receive post-receive.bkp
ln -s /usr/share/git-core/contrib/hooks/post-receive-email post-receive
git config hooks.mailinglist "mailinglist@example.com"
git config hooks.emailprefix "[SUBJECT PREFIX] "  # note the trailing space</pre>
<h2>Git Commit Notifier</h2>
<p>This &#8216;plugin&#8217; will allow you to send an email every time a commit is committed to the repository. You may use this on the central repository to keep everyone following the project up to date.</p>
<ul>
<li>The source may also be downloaded at <a href="http://github.com/bitboxer/git-commit-notifier" target="_blank">http://github.com/bitboxer/git-commit-notifier</a></li>
</ul>
<p>To use this plugin, you first need to compile the script, then add the config information to each repository you wish to use it on.</p>
<h3>To Install Git Commit Notifier</h3>
<p>On <a href="http://fedoraproject.org" target="_blank">Fedora</a> 12 you first need to install Ruby and a few other dependences. After you download the needed dependences, you may compile the script.</p>
<pre>yum install ruby rubygems hpricot rubygem-hpricott
gem install git-commit-notifier</pre>
<h3>To Configure Git Commit Notifier</h3>
<p>In your repository&#8217;s <code>.git/hooks</code> folder or if it&#8217;s a &#8220;bare&#8221; repository, just the hooks folder. Create a file named <code>post-receive</code> with the following content.</p>
<pre>#!/bin/sh
git-commit-notifier ../git-commit-notifier.yml</pre>
<p>Once you have saved the file, you need to make it executable.</p>
<pre>chmod 775 post-receive</pre>
<p>After you have made the hook executable, check up one directory to the repository&#8217;s .git directory. From here you need to create and modify your git-commit-notifier&#8217;s config file. Start out by creating a file named <code>git-commit-notifier.yml</code>, and copy the below config to it.</p>
<h3>Git Commit Notifier Config File</h3>
<pre># The recipient for the commit:
mailinglist: developers@example.com

# set to true if you want to ignore empty merge messages
ignore_merge: false

# Optional parameter for the subject-line of the mail
# emailprefix: GIT

# Decorate files with link to a webview. Possible values: none or gitweb
link_files: none

# select the delivery method: smtp or sendmail
delivery_method: sendmail

# settings for the smtp server
smtp_server:
address: localhost
port: 25
domain: localhost
user_name: user@localhost
password: password
authentication: plain
enable_tls: false

# settings for sendmail
sendmail_options:
location: /usr/sbin/sendmail
arguments: -i -t

# If link_files is set to "gitweb", you need to configure the path to your gitweb
# instance and the project name.
gitweb:
path: http://developerserver/path_to_gitweb
project: test.git</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (13.044)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (10.3207)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (8.15839)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (7.27175)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.9847)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/05/git-commit-email-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing the git, cgit web interface on a Fedora 12 server</title>
		<link>http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/</link>
		<comments>http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/#comments</comments>
		<pubDate>Sun, 02 May 2010 18:44:42 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=2210</guid>
		<description><![CDATA[cgit is fast web interface for the git. cgit has built a cache and is compiled in c so it&#8217;s very quick. To start out, download the current version of cgit via git git clone git://hjemli.net/pub/git/cgit Next you need to setup the git submodule cd cgit git submodule init git submodule update Once your done, run get-git make get-git Then compile the software make And install it make install After you have installed cgit, you will need to setup Apache...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (13.0642)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (11.2852)--></li>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (9.22587)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (7.71608)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (7.14295)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>cgit is fast web interface for the git. cgit has built a cache and is compiled in c so it&#8217;s very quick.</p>
<p>To start out, download the current version of cgit via git</p>
<pre>git clone git://hjemli.net/pub/git/cgit</pre>
<p>Next you need to setup the git submodule</p>
<pre>cd cgit
git submodule init
git submodule update</pre>
<p>Once your done, run get-git</p>
<pre>make get-git</pre>
<p>Then compile the software</p>
<pre>make</pre>
<p>And install it</p>
<pre>make install</pre>
<p>After you have installed cgit, you will need to setup Apache to run cgit.  This is pretty easy, just edit your <code>/etc/httpd/conf/httpd.conf</code> file and add the following for the site you wish to run cgit on.</p>
<pre>&lt;Directory "/var/www/code.mattrude.com/"&gt;
      AllowOverride None
      Options ExecCGI
      Order allow,deny
      Allow from all
&lt;/Directory&gt;</pre>
<p>Once your done setting up cgit in Apache, you may configure cgit by creating a cgitrc file at <code>/etc/cgitrc</code>.  Below is the example config file.</p>
<pre>EXAMPLE CGITRC FILE
-------------------

# Enable caching of up to 1000 output entriess
cache-size=1000

# Specify some default clone prefixes
clone-prefix=git://foobar.com ssh://foobar.com/pub/git http://foobar.com/git

# Specify the css url
css=/css/cgit.css

# Show extra links for each repository on the index page
enable-index-links=1

# Show number of affected files per commit on the log pages
enable-log-filecount=1

# Show number of added/removed lines per commit on the log pages
enable-log-linecount=1

# Add a cgit favicon
favicon=/favicon.ico

# Use a custom logo
logo=/img/mylogo.png

# Enable statistics per week, month and quarter
max-stats=quarter

# Set the title and heading of the repository index page
root-title=foobar.com git repositories

# Set a subheading for the repository index page
root-desc=tracking the foobar development

# Include some more info about foobar.com on the index page
root-readme=/var/www/htdocs/about.html

# Allow download of tar.gz, tar.bz2 and zip-files
snapshots=tar.gz tar.bz2 zip

##
## List of common mimetypes
##

mimetype.git=image/git
mimetype.html=text/html
mimetype.jpg=image/jpeg
mimetype.jpeg=image/jpeg
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml

##
## List of repositories.
## PS: Any repositories listed when section is unset will not be
##     displayed under a section heading
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
##      and included like this:
##        include=/etc/cgitrepos
##

repo.url=foo
repo.path=/pub/git/foo.git
repo.desc=the master foo repository
repo.owner=fooman@foobar.com
repo.readme=info/web/about.html

repo.url=bar
repo.path=/pub/git/bar.git
repo.desc=the bars for your foo
repo.owner=barman@foobar.com
repo.readme=info/web/about.html

# The next repositories will be displayed under the 'extras' heading
section=extras

repo.url=baz
repo.path=/pub/git/baz.git
repo.desc=a set of extensions for bar users

repo.url=wiz
repo.path=/pub/git/wiz.git
repo.desc=the wizard of foo

# Add some mirrored repositories
section=mirrors

repo.url=git
repo.path=/pub/git/git.git
repo.desc=the dscm

repo.url=linux
repo.path=/pub/git/linux.git
repo.desc=the kernel

# Disable adhoc downloads of this repo
repo.snapshots=0

# Disable line-counts for this repo
repo.enable-log-linecount=0

# Restrict the max statistics period for this repo
repo.max-stats=month</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (13.0642)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (11.2852)--></li>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (9.22587)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (7.71608)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (7.14295)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing the GIT Daemon for Read Only Access to Repoistory</title>
		<link>http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/</link>
		<comments>http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:57:19 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=2199</guid>
		<description><![CDATA[The idea here is to allow anyone to download your GIT repository using the native git protocol.  This is similar to the post I wrote about Creating a secure Git repository server, but the below method allows full read only public access to the repositories. Start out by modifying the new file git-daemon. vim /etc/xinetd.d/git-daemon Add the below text to the file. # description: The git daemon offers anonymous access to git repositories service git { disable = no type...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (12.6294)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (11.9937)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (11.9236)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (9.19997)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (8.52209)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>The idea here is to allow anyone to download your GIT repository using the native git protocol.   This is similar to the post I wrote about <a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating a secure Git repository server</a>, but the below method allows full read only public access to the repositories.</p>
<p>Start out by modifying the new file <code>git-daemon</code>.</p>
<pre>vim /etc/xinetd.d/git-daemon</pre>
<p>Add the below text to the file.</p>
<pre># description: The git daemon offers anonymous access to git repositories
service git
{
    disable        = no
    type           = UNLISTED
    port           = 9418
    socket_type    = stream
    wait           = no
    user           = git
    server         = /usr/libexec/git-core/git-daemon
    server_args    = --inetd --export-all --base-path=/var/git
    log_on_failure += USERID
}</pre>
<p>You may need to change the location of the git-daemon (the above example is from Fedora) and you will need to update the location of your git repository directory.</p>
<p>The above configuration will share <strong>ALL</strong> the git repositories in the <code>/var/git</code> directory.</p>
<p>If you do not wish for the all repositories to be public, you may remove the <code>--export-all</code> flag and add a empty file named <code>git-daemon-export-ok</code> to the git repository you wish to still share.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (12.6294)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (11.9937)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (11.9236)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (9.19997)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (8.52209)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Cheat Sheet</title>
		<link>http://mattrude.com/2010/03/git-cheat-sheet/</link>
		<comments>http://mattrude.com/2010/03/git-cheat-sheet/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 18:08:20 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=2145</guid>
		<description><![CDATA[Git Global Setup git config --global user.name "Your Name Here" git config --global user.email you@example.com Git Commands Common Git Commands To download a new git repository (Public access) git clone http://git.example.com/folder/project.git Update an exciting repository (From within the projects folder) git pull Comment a change git comment file.txt To Revert a comment git revert ce963c9db00c25b3c1e6add1fe6032aef61a5bed Commit Modify the last commit git commit --amend Patches Creating a patch git diff file_with_changes &#62; 0001-name_of_patch_file.patch gzip 0001-name_of_patch_file.patch Patching a file or directory gzip...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (22.8854)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.5257)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (12.8411)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (10.9535)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (10.9244)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<h2>Git Global Setup</h2>
<pre> git config --global user.name "Your Name Here"
 git config --global user.email you@example.com
</pre>
<h2>Git Commands</h2>
<h3>Common Git  Commands</h3>
<h4>To  download a new git repository</h4>
<p>(Public access)</p>
<pre>git clone http://git.example.com/folder/project.git</pre>
<h4>Update an exciting repository</h4>
<p><em>(From within the projects folder)</em></p>
<pre>git pull</pre>
<h4>Comment a change</h4>
<pre>git comment file.txt</pre>
<h4>To Revert a  comment</h4>
<pre>git revert ce963c9db00c25b3c1e6add1fe6032aef61a5bed</pre>
<h3>Commit</h3>
<h4>Modify the  last commit</h4>
<pre>git commit --amend</pre>
<h3>Patches</h3>
<h4>Creating a patch</h4>
<pre>git diff file_with_changes &gt; 0001-name_of_patch_file.patch
gzip 0001-name_of_patch_file.patch</pre>
<h4>Patching a file or directory</h4>
<pre>gzip -dc 0001-name_of_patch_file.patch.gz |patch -p1</pre>
<h3>Branching</h3>
<h4>Creating a  new branch</h4>
<pre>git branch <em>&lt;branch&gt;</em></pre>
<p>or to create a branch and switch to it</p>
<pre>git checkout -b <em>&lt;branch&gt;</em></pre>
<h4>Pulling changes from branches</h4>
<pre>git checkout <em>&lt;branch_committing_to&gt;</em></pre>
<p>Now that your in the branch you want to add the changes to, run:</p>
<pre>git pull . <em>&lt;branch_committing_from&gt;</em></pre>
<h4>Changing to a different branch</h4>
<pre>git checkout <em>&lt;branch&gt;</em></pre>
<h4>Deleting a branch</h4>
<pre>git branch -d <em>&lt;branch&gt;</em></pre>
<h4>Deleting a  remote branch</h4>
<pre>git push origin :<em>&lt;branch&gt;</em></pre>
<h4>Pushing a  branch to github</h4>
<pre>git push <em>&lt;remote_repository_name&gt; &lt;branch_name&gt;</em></pre>
<p>So that would be&#8230;</p>
<pre>git push origin <em>&lt;branch&gt;</em></pre>
<h4>Display  branches on github</h4>
<pre>git remote show origin</pre>
<h4>Pulling a branch from github</h4>
<pre>git checkout --track -b <em>&lt;name_of_local_branch&gt;</em> origin/<em>&lt;name_of_remote_branch&gt;</em></pre>
<h3>Tagging</h3>
<h4>Tagging a branch</h4>
<pre>git tag -a -m "tagging version 1.0" 1.0</pre>
<h4>Pushing  the tag to github</h4>
<pre>git push --tags
</pre>
<h4>Deleting a tag</h4>
<pre>git tag -d 1.0</pre>
<h4>Removing a deleted tag from github</h4>
<pre>git push origin :refs/tags/1.0</pre>
<h3>Submodules</h3>
<h4>To  update existing submodules</h4>
<pre>git pull
git submodule init
git submodule update</pre>
<h4>To add a new submodule to a project</h4>
<pre>git submodule add &lt;remote-host&gt;:&lt;project.git&gt; &lt;project.git&gt;</pre>
<p>So if you are adding project &#8220;program&#8221; from the example git server  you will run</p>
<pre>git submodule add git://example.com/program.git program</pre>
<h2>Creating an secure Git remote server</h2>
<p>On the <strong>Server</strong> create the git repository</p>
<pre>mkdir name-of-git-repo.git
cd name-of-git-repo.git
git init --bare</pre>
<p>On the <strong>Client System</strong> create the git repo to import into the server</p>
<pre>git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@REMOTE_SERVER:name-of-git-repo.git
git push origin master</pre>
<ul>
<li> <a rel="nofollow" href="http://blog.commonthread.com/2008/4/14/setting-up-a-git-server">http://blog.commonthread.com/2008/4/14/setting-up-a-git-server</a></li>
</ul>
<h2>Importing an <a title="SVN" href="http://wiki.mattrude.com/index.php/SVN">SVN</a> repo into git</h2>
<p>To import a svn repo create a new git repo and run</p>
<pre>git svn clone https://svn.foo.com/svn/proj
git commit</pre>
<ul>
<li> <a rel="nofollow" href="http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html">http://tsunanet.blogspot.com/2007/07/learning-git-svn-in-5min.html</a></li>
<li> <a rel="nofollow" href="http://djwonk.com/blog/2008/05/09/cleanly-import-svn-repository-into-git/">http://djwonk.com/blog/2008/05/09/cleanly-import-svn-repository-into-git/</a></li>
</ul>
<h2>Git Links</h2>
<ul>
<li> <a rel="nofollow" href="http://github.com/guides/home">http://github.com/guides/home</a></li>
<li> <a rel="nofollow" href="http://whygitisbetterthanx.com/">http://whygitisbetterthanx.com</a></li>
<li> <a rel="nofollow" href="http://github.com/">http://github.com</a></li>
</ul>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (22.8854)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.5257)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (12.8411)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (10.9535)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (10.9244)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/03/git-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run a Secure git Repository on FreeNAS</title>
		<link>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/</link>
		<comments>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 00:31:38 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1975</guid>
		<description><![CDATA[Running a secure git repository on FreeNAS is pretty straight forward, once you understand what your trying to do.  If you have looked over my previous post &#8220;Creating a secure Git repository server&#8221; you understand that all you really need to do is connect to the git repository via ssh/ssl and copy back what you need.  The hardest part of using FreeNAS is creating the keys. To start out, you need to create a user account on the FreeNAS system. ...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (21.4372)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (21.1919)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.3136)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (14.9748)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (14.374)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Running a secure git repository on <a href="http://freenas.org/freenas" target="_blank">FreeNAS</a> is pretty straight forward, once you understand what your trying to do.  If you have looked over my previous post &#8220;<a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating a secure Git repository  server</a>&#8221; you understand that all you really need to do is connect to the git repository via ssh/ssl and copy back what you need.  The hardest part of using FreeNAS is creating the keys.</p>
<p>To start out, you need to create a user account on the FreeNAS system.  This will be a generic account that everyone who has write access will use.  You may also create a account for each person, and grant each of them access to the central repository.</p>
<p>After you have your account, follow my post on &#8220;<a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/">Enable SSH Key Authorization on  FreeNAS</a>&#8221; to copy over the SSL key and setup the account.  Once you are able to log in as your FreeNAS git user, you may follow my previous post &#8220;<a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating  a secure Git repository  server</a>&#8221; to setup the git repository.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (21.4372)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (21.1919)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (16.3136)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (14.9748)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (14.374)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a MediaWiki database from MySQL to SQLite</title>
		<link>http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/</link>
		<comments>http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 19:15:23 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1889</guid>
		<description><![CDATA[So the plane here is to convert a fully working MediaWiki install running on MySQL to run on SQLite instead.  To do this you will need to install a 2nd MediaWIKI install on a test or development system.  Once you are done you can move your new MediaWiki install to where every you would like. Backup up your Old MediaWiki Installation To start, from within your working MediaWiki install, first back up your data. php maintenance/dumpBackup.php --full --uploads &#62; wiki-backup.xml...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (15.6681)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (14.704)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (10.5271)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (7.7054)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (6.86979)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>So the plane here is to convert a fully working <a href="http://www.mediawiki.org/wiki/MediaWiki" target="_blank">MediaWiki</a> install running on <a href="http://dev.mysql.com/" target="_blank">MySQL</a> to run on <a href="http://www.sqlite.org/" target="_blank">SQLite</a> instead.  To do this you will need to install a 2nd MediaWIKI install on a test or development system.  Once you are done you can move your new MediaWiki install to where every you would like.</p>
<h3>Backup up your Old MediaWiki Installation</h3>
<p>To start, from within your working MediaWiki install, first back up your data.</p>
<pre>php maintenance/dumpBackup.php --full --uploads &gt; wiki-backup.xml</pre>
<p>This will create a file named wiki-backup.xml in your MediaWiki&#8217;s root directory, copy that file to a safe place.  We aren&#8217;t going to touch the MySQL database until were done, but it&#8217;s always a good idea to have backups safe and sound in case you need them.</p>
<p>The backup script run above dose not backup your MediaWiki&#8217;s uploaded images and other files.  These files are stored in your &#8216;images&#8217; folder in the root of MediaWiki&#8217;s directory.  You need to back those up also.</p>
<pre>tar -czf wiki-images.tgz images/</pre>
<p>You should now have everything you need from your old MediaWiki install. Next you will need to install MediaWiki in a new location on your sever (or a development server).</p>
<h3>Installing your new SQLite MediaWiki site</h3>
<p>You should download and install the newest version of MediaWiki.  I always you the development trunk since this is what&#8217;s used on <a href="http://en.wikipedia.org/wiki/Special:Version" target="_blank">Wikipedia</a>.</p>
<p>During the install process you will be asked what database you would like to use, you much choose &#8216;SQLite&#8217; since this is the point of reinstalling MediaWiki.  Bring your new install all the way so you have a new install running on your server.  MediaWiki will create a default home page for you and you should be able to modify that page.  If you are unable to get MediaWiki installed or if you have a problem modifying the Main Page after the install, please see the MediaWiki <a href="http://www.mediawiki.org/wiki/Mailing_lists" target="_blank">mailing lists</a> or the <a href="http://www.mediawiki.org/wiki/Manual:FAQ" target="_blank">FAQ</a> for assistance.</p>
<h3>Restoring your Data on your new SQLite site</h3>
<p>After you have your new SQLite version of MediaWiki installed and working, you need to restore your data.  The database part of this is pretty strate forward.</p>
<p>Start by copying the xml file you created in the first step to your new MediaWiki install.  Then run the following:</p>
<pre>php maintenance/importDump.php wiki-backup.xml</pre>
<p>Depending on the amount of pages you have, this may take quite some time to process. Once this is done all your pages should be on your new install (expect the Main Page, you will need to copy that manually).<br />
To restore you images and other uploaded files, first you need to extract the tarball you made earlier to temporary location.</p>
<pre>mkdir temporary
cp wiki-images.tgz temporary
cd temporary/
tar -xzf wiki-images.tgz</pre>
<p>This will create a bunch of folders in the temporary directory, you need to copy everything in those folders into a single folder. The name of the folder doesn&#8217;t matter, I&#8217;m using tempimages, but you may use what you would like.</p>
<pre>cd ../
mkdir tempimages
cp temporary/images/*/*/* tempimages</pre>
<p>Now that you have everything in a single folder, import the content of that folder into your new MediaWiki install.</p>
<pre>php maintenance/importImages.php tempimages/</pre>
<p>And that should do it, you should now have a fully working MediaWiki install using SQLite.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (15.6681)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (14.704)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (10.5271)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (7.7054)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (6.86979)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable SSH Key Authorization on FreeNAS</title>
		<link>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/</link>
		<comments>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 23:06:36 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1882</guid>
		<description><![CDATA[FreeNAS is a powerful tools for archive data and other long-term storage requirements. Recently I have started backing up this and other off-site servers to one of my local FreeNAS boxes. Since these systems are only connected via the insecure internet (no VPN), I decided to transmit the backup files via SSH using SCP.  In order to do this without having to enter my password in for each and every backup (most of which happen while I&#8217;m hopeful sleeping), I...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (21.5102)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (17.4435)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (10.7403)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (8.08356)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.69155)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>FreeNAS is a powerful tools for archive data and other long-term storage requirements. Recently I have started backing up this and other off-site servers to one of my local FreeNAS boxes. Since these systems are only connected via the insecure internet (no VPN), I decided to transmit the backup files via SSH using SCP.  In order to do this without having to enter my password in for each and every backup (most of which happen while I&#8217;m hopeful sleeping), I needed to implement SSH Key Authorization on the receiving FreeNAS box.</p>
<p>To do this first I needed to create a DSA key pair on a different system.  On my Fedora 12 laptop I ran</p>
<pre>ssh-keygen -t dsa</pre>
<p>The trick here is to not create your new key pair in the default directory of &#8220;~/.ssh/&#8221; but in a temporary directory instead. So when it asks you.</p>
<pre>Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):</pre>
<p>Enter a different file in witch to save the key in.  Note this is asking for the name of a file, not the name of the directory, it will also create a .pub file, this is the public key for the above private key.</p>
<p>Now that you have a public/private key for the FreeNAS box, if you don&#8217;t already you need to create one for the user that you plan on sending the file from.  Just follow the above command, but this time, you may just hit enter all the way threw leaving all options as default.</p>
<p>Next, go to your FreeNAS web-page control panel, If you don&#8217;t already have one, you will need to create a user on your FreeNAS box for you to connect to.  You may do this via &#8220;Access -&gt; User and Groups&#8221; from the black bar on the top of the page.</p>
<p>Now from the top (black) bar go to &#8220;Services -&gt; SSH&#8221;</p>
<p>On your Services|SSH page, first make sure the service is enabled (top right hand corner). Once it is you will be able to change the below options.</p>
<ul>
<li><strong>TCP Port:</strong> The default (port 22) is fine in most cases, but note if you change it, you must use the new port for all connections.</li>
<li><strong>Permit root login:</strong> My option is that the root account should never be allowed to log in via a remote process.  You should set your system up correctly where this is not needed.</li>
<li><strong>Password authentication:</strong> For now this must be enabled (checked), once you have set &#8220;Key Authorization&#8221; up, you may disable this option.</li>
<li><strong>TCP forwarding:</strong> Disabled (unchecked)</li>
<li><strong>Compression:</strong> Enabled (checked)</li>
<li><strong>Private Key:</strong> This will be were we put the private key created above.  All you need to do is copy and paste.</li>
<li><strong>Extra options:</strong> Blank</li>
</ul>
<p>After you have made your changes, &#8220;Save and Restart&#8221; the service.</p>
<p>On your local system, you need to copy the content of the local users public (~/.ssh/username.pub) key file to a new file named &#8220;authorized_keys&#8221; <em>(Note: this is not the file we created for FreeNAS but the file we created for your local account)</em>.  This is the file that will need to be copied to your FreeNAS box.</p>
<p>Now that you have all the needed bits, we need to log into your FreeNAS server and create a &#8220;.ssh&#8221; directory to store the &#8220;authorized_keys&#8221; file.  To log in to the FreeNAS box interactively run a command similar too.</p>
<pre>ssh freenasuser@freenasaddress</pre>
<p>Or if you changed the &#8220;TCP Port&#8221; above, your command will look like this:</p>
<pre>ssh -P freenasport freenasuser@freenasaddress</pre>
<p>Once your logged in, you need to create the directory, by doing.</p>
<pre>mkdir ~/.ssh</pre>
<p>After you have successfully created your directory, you may exit out of your FreeNAS box for the next step.<br />
Back on your local system you need to copy the &#8220;authorized_keys&#8221; file created before to the FreeNAS box.  Using SCP you can do this by running a command like:</p>
<pre>scp -P freenasport authorized_keys freenasuser@freenasaddress:~/.ssh/</pre>
<p>This will copy the file to the FreeNAS box. Next, reconnect to the FreeNAS box as you did before and run.</p>
<pre>cd ~/.ssh/
chmod 600 authorized_keys</pre>
<p>Once your done, you should be able to connect to your FreeNAS box using the private key in the authorized_keys with out a password.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (21.5102)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (17.4435)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (10.7403)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (8.08356)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.69155)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Installing Dovecot with SQLite Support</title>
		<link>http://mattrude.com/2009/12/installing-dovecot-using-sqlite/</link>
		<comments>http://mattrude.com/2009/12/installing-dovecot-using-sqlite/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 18:31:31 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1648</guid>
		<description><![CDATA[Following in line with my previous post on Installing Postfix with SQL Support. This post will describe installing Dovecot from source with full SQLite support. Installing from Source First start out by downloading the lastest version from Dovecot&#8217;s website (the current version as of the writing of the how-to is 1.2.8). yum -y install sqlite sqlite-devel gcc make patch db4-devel cyrus-sasl-devel Next download and untar the source code. wget http://dovecot.org/releases/1.2/dovecot-1.2.8.tar.gz tar -xzf dovecot-1.2.8.tar.gz cd dovecot-1.2.8/ Next, you will need to...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (45.3179)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (15.6358)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (11.9806)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (9.5386)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (9.46202)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Following in line with my previous post on <a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" target="_blank">Installing Postfix with SQL Support</a>. This post will describe installing <a href="http://www.dovecot.org" target="_blank">Dovecot</a> from source with full <a href="http://www.sqlite.org" target="_blank">SQLite</a> support.</p>
<h3>Installing from Source</h3>
<p>First start out by downloading the lastest version from Dovecot&#8217;s website (the current version as of the writing of the how-to is 1.2.8).</p>
<pre>yum -y install sqlite sqlite-devel gcc make patch db4-devel cyrus-sasl-devel</pre>
<p>Next download and untar the source code.</p>
<pre>wget http://dovecot.org/releases/1.2/dovecot-1.2.8.tar.gz
tar -xzf dovecot-1.2.8.tar.gz
cd dovecot-1.2.8/</pre>
<p>Next, you will need to configure the code before compiling.</p>
<pre>./configure --with-sqlite
echo $?</pre>
<p>Assuming the configure command finishes with out error (the last line should be a &#8220;0&#8243;). Compile and install Dovecot.</p>
<pre>make &amp;&amp; make install</pre>
<h3>Configuring Dovecot for SQLite</h3>
<p>First we need to create or modify the dovecot config file for SQLite access.  If you are currenly using MySQL with Dovecot, switching to SQLite is pretty easy and strate forward.  Or you may just use the below dovecot config file.</p>
<pre>### Dovecot configuration file ###
### /etc/dovecot.conf ###
protocols = pop3 imap
login_user = postfix
auth_cache_size = 128
auth_cache_ttl = 600
mail_debug = yes

mail_location = maildir:%h/

protocol imap {
 listen = *:143
}

protocol lda {
  postmaster_address = postmaster@mattrude.com
  hostname = odin.mattrude.com
  mail_plugin_dir = /usr/local/lib/dovecot/lda
  auth_socket_path = /var/run/dovecot/auth-master
}

auth default {
  mechanisms = plain login
  userdb sql {
    args = /etc/dovecot-sqlite.conf
  }
  passdb sql {
    args = /etc/dovecot-sqlite.conf
  }
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      user = virtualmail
      group = virtualmail
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}</pre>
<p>After you have created the main Dovecot config file, you will need to add the SQLite config file (below).</p>
<pre>### /etc/dovecot-sqlite.conf ###
driver = sqlite
connect = /etc/postfix/postfix.sqlite
password_query = SELECT password, username AS user \
  FROM mailbox WHERE username = '%u' AND domain = '%d'
user_query = SELECT maildir, 1000 AS uid, 1000 AS gid FROM mailbox WHERE \
  username = '%u' AND domain = '%d' AND active = '1'</pre>
<p>After the config files have been created, we need to create the database file, here is where you will need SQLite installed on the system.</p>
<h3>Building the SQLite Database</h3>
<p>In order to use the SQLite function, you need a SQLite database.  First using SQLite3 run</p>
<pre>sqlite3 /etc/postfix/postfix.sqlite</pre>
<p>To create the database, then you can copy and past the following scheme into the new database.</p>
<pre>CREATE TABLE alias (
  address varchar(255) NOT NULL,
  goto text NOT NULL,
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1');

CREATE TABLE domain (
  domain varchar(255) NOT NULL,
  description varchar(255) NOT NULL,
  aliases int(10) NOT NULL default '0',
  mailboxes int(10) NOT NULL default '0',
  maxquota bigint(20) NOT NULL default '0',
  quota bigint(20) NOT NULL default '0',
  transport varchar(255) NOT NULL,
  backupmx tinyint(1) NOT NULL default '0',
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1' );

CREATE TABLE mailbox (
  username varchar(255) NOT NULL,
  password varchar(255) NOT NULL,
  name varchar(255) NOT NULL,
  maildir varchar(255) NOT NULL,
  quota bigint(20) NOT NULL default '0',
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1',
  local_part varchar(255) NOT NULL );</pre>
<p>Then close the database</p>
<pre>.quit</pre>
<p>Or you may download mine from below and use the same scheme work.</p>
<ul>
<li> <a title="Postfix.sqlite" href="http://wiki.mattrude.com/images/1/15/Postfix.sqlite">postfix.sqlite</a></li>
</ul>
<pre>mkdir /var/run/dovecot</pre>
<h3>Dovecot INIT file</h3>
<pre>#!/bin/bash
#
#	/etc/rc.d/init.d/dovecot
#
# Starts the dovecot daemon
#
# chkconfig: - 65 35
# description: Dovecot Imap Server
# processname: dovecot
# Source function library.
. /etc/init.d/functions

test -x /usr/local/sbin/dovecot || exit 0

RETVAL=0
prog="Dovecot Imap"

start() {
       echo -n $"Starting $prog: "
	daemon /usr/local/sbin/dovecot
	RETVAL=$?
	[ $RETVAL -eq 0 ] &amp;&amp; touch /var/lock/subsys/dovecot
	echo
}

stop() {
	echo -n $"Stopping $prog: "
	killproc /usr/local/sbin/dovecot
	RETVAL=$?
	[ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/dovecot
	echo
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  reload|restart)
	stop
	start
	RETVAL=$?
	;;
  condrestart)
	if [ -f /var/lock/subsys/dovecot ]; then
	    stop
	    start
	fi
	;;
  status)
	status /usr/local/sbin/dovecot
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
	exit 1
esac

exit $RETVAL</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (45.3179)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (15.6358)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (11.9806)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (9.5386)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (9.46202)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/12/installing-dovecot-using-sqlite/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How-To Disable tool-tips in Fedora 12 (while using GNOME)</title>
		<link>http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/</link>
		<comments>http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 04:47:01 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1606</guid>
		<description><![CDATA[As the user you login as (ie: not root) edit or create the file named gtkrc-2.0. vim ~/.gtkrc-2.0 and add the line gtk-enable-tooltips = 0 if the file dosen&#8217;t exict yet, don&#8217;t worry about it. Last, reboot your system and the tool tips should be gone. Related Posts Installing the git, cgit web interface on a Fedora 12 server Enable SSH Key Authorization on FreeNAS Setting the Time Zone on Fedora from the shell Run a Secure git Repository on...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (11.8973)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (6.93166)--></li>
		<li><a href="http://mattrude.com/2009/08/setting-the-time-zone-on-fedora-from-the-shell/" rel="bookmark">Setting the Time Zone on Fedora from the shell</a><!-- (6.37969)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (5.61123)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (5.39612)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>As the user you login as (ie: not root) edit or create the file named <em>gtkrc-2.0</em>.</p>
<pre>vim ~/.gtkrc-2.0</pre>
<p>and add the line</p>
<pre>gtk-enable-tooltips = 0</pre>
<p>if the file dosen&#8217;t exict yet, don&#8217;t worry about it.</p>
<p>Last, reboot your system and the tool tips should be gone.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (11.8973)--></li>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (6.93166)--></li>
		<li><a href="http://mattrude.com/2009/08/setting-the-time-zone-on-fedora-from-the-shell/" rel="bookmark">Setting the Time Zone on Fedora from the shell</a><!-- (6.37969)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (5.61123)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (5.39612)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Update Script for MiniMyth</title>
		<link>http://mattrude.com/2009/11/auto-update-script-for-minimyth/</link>
		<comments>http://mattrude.com/2009/11/auto-update-script-for-minimyth/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 06:13:09 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Mythtv]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1516</guid>
		<description><![CDATA[This script will download the newest version of MiniMyth and update your tftp directory. It first downloads the version file and compares that version number to the current install version of MiniMyth install.  If it determines that the version dose not match it will then download the current release, untar it and move the files to their current locations. It dose not delete any older versions on your server. The TFTPDIR variable is the location on your tftp server where...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (6.39307)--></li>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (5.85992)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (5.50937)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>This script will download the newest version of <a href="http://www.minimyth.org/" target="_blank">MiniMyth</a> and update your tftp directory.</p>
<p>It first downloads the version file and compares that version number to the current install version of MiniMyth install.  If it determines that the version dose not match it will then download the current release, untar it and move the files to their current locations. It dose not delete any older versions on your server.</p>
<ul>
<li>The <strong><em>TFTPDIR</em></strong> variable is the location on your tftp server where the MiniMyth files are stored.</li>
<li>The <strong><em>URL</em></strong> variable is the MiniMyth directory that the install of MiniMyth you wish to use lives.</li>
</ul>
<p>You may also download the full directory structure with this script from <a href="http://github.com/mattrude/minimyth-build-script" target="_self">my github repository</a> or <a href="http://mattrude.com/wp-content/uploads/2009/11/minimyth-build-script-v1.tar.gz" target="_self">from my server</a>.</p>
<pre># /bin/bash
# Matt Rude &lt;m@mattrude.com&gt; 11-Nov-2009
#
TFTPDIR=/tftpboot/PXEClient
URL="http://minimyth.org/download/stable/latest/"
##############################################################################
if [ -e $TFTPDIR/version ]; then
 mv $TFTPDIR/version $TFTPDIR/version.last
 rm -rf $TFTPDIR/verstion.md5
else
 touch $TFTPDIR/version.log
 touch $TFTPDIR/version.last
fi

cd $TFTPDIR
wget -nc $URL/version &gt; /dev/null 2&gt;&amp;1
VER=`cat $TFTPDIR/version`
OLDVER=`cat $TFTPDIR/version.last`

if [ "$VER" = "$OLDVER" ]; then
 chown -R apache:apache $TFTPDIR/*
 exit 0
else
 echo "`date` Upgraded to version: $VER" &gt;&gt; version.log

 rm -rf $TFTPDIR/ram-minimyth-*.tar.bz2.md5
 wget -nc $URL/ram-minimyth-$VER.tar.bz2 &gt; /dev/null 2&gt;&amp;1
 wget -nc $URL/ram-minimyth-$VER.tar.bz2.md5 &gt; /dev/null 2&gt;&amp;1
 MD5STAT=`md5sum -c ram-minimyth-$VER.tar.bz2.md5 |awk ' {print $2 }'`
 if [ "$MD5STAT" = "OK" ]; then
  rm -f $TFTPDIR/kerne*
  rm -f $TFTPDIR/rootf*
  rm -fr $TFTPDIR/conf/default/theme*
  tar -xjf ram-minimyth-$VER.tar.bz2
  rm -rf ram-minimyth-$VER.*
 else
  echo "`date` Minimyth Version $VER Failed the MD5 check" &gt;&gt; version.log
  echo "" &gt; $TFTPDIR/version
  exit 1
 fi

 RAMDIR=$TFTPDIR/ram-minimyth-$VER

 mkdir -p $TFTPDIR/conf/default
 cp $RAMDIR/kernel $TFTPDIR/kernel-$VER
 cp $RAMDIR/rootfs $TFTPDIR/rootfs-$VER
 cp -r $RAMDIR/themes $TFTPDIR/conf/default/themes-$VER

 ln -s kernel-$VER kernel
 ln -s rootfs-$VER rootfs
 cd $TFTPDIR/conf/default
 ln -s themes-$VER themes
 #mythtvosd --template=scroller --scroll_text="minimyth upgraded to: $VER" &gt; /dev/null
fi

cd $TFTPDIR
mv version.log version.tmp
tail -2 version.tmp &gt; version.log
rm -rf version.tmp
chown -R apache:apache $TFTPDIR/*
exit 0
</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (6.39307)--></li>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (5.85992)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (5.50937)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/11/auto-update-script-for-minimyth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Gallery Image Link in Image Posts</title>
		<link>http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/</link>
		<comments>http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 17:51:32 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Photo Gallery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1477</guid>
		<description><![CDATA[If you were to view one of the images in my WordPress gallery, such as my Minnesota State Fair – 2009 gallery, and view one of the images.  You will see a previous and next image on the bottom of the image page.  As you may of already of guessed, the next and previous images are all part of the way my theme handles image pages. In order to do this, I needed to add the below snippet to my...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (18.0148)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (16.922)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (13.9492)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (9.70413)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (8.06489)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>If you were to view one of the images in my WordPress gallery, such as my <a href="http://mattrude.com/2009/09/minnesota-state-fair-2009/" target="_blank">Minnesota State Fair – 2009</a> gallery, and view one of the images.  You will see a previous and next image on the bottom of the image page.  As you may of already of guessed, the next and previous images are all part of the way my theme handles image pages.</p>
<p>In order to do this, I needed to add the below snippet to my image.php file.  You should already have a &#8220;navigation&#8221; section, find it, and replace it with the below code <strong>(MAKE SURE YOU BACK UP YOUR IMAGE.PHP FILE FIRST)</strong>.</p>
<pre>&lt;div class="image-navigation"&gt;
	&lt;?php $attachments = array_values(get_children( array('post_parent' =&gt; $post-&gt;post_parent, 'post_status' =&gt; 'inherit', 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'order' =&gt; 'ASC', 'orderby' =&gt; 'menu_order ID') ));
	foreach ( $attachments as $k =&gt; $attachment )
		if ( $attachment-&gt;ID == $post-&gt;ID )
			break;
	$attachments = array_values(get_children( array('post_parent' =&gt; $post-&gt;post_parent, 'post_status' =&gt; 'inherit', 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'order' =&gt; 'ASC', 'orderby' =&gt; 'menu_order ID') ));
       $next_url =  isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]-&gt;ID) : get_permalink($attachments[0]-&gt;ID);
       $previous_url =  isset($attachments[$k-1]) ? get_permalink($attachments[$k-1]-&gt;ID) : get_permalink($attachments[0]-&gt;ID);
	if ( wp_get_attachment_image( $post-&gt;ID+1 ) != null ) { ?&gt;
		&lt;p class="attachment"&gt;
			Next Image&lt;br /&gt;
			&lt;a href="&lt;?php echo $next_url; ?&gt;"&gt;&lt;?php echo wp_get_attachment_image( $post-&gt;ID+1, 'thumbnail' ); ?&gt;&lt;/a&gt;
		&lt;/p&gt;
    &lt;?php }

    if ( wp_get_attachment_image( $post-&gt;ID-1 ) != null ) { ?&gt;
        &lt;p class="attachment"&gt;
            Previous Image&lt;br /&gt;
            &lt;a href="&lt;?php echo $previous_url; ?&gt;"&gt;&lt;?php echo wp_get_attachment_image( $post-&gt;ID-1, 'thumbnail' ); ?&gt;&lt;/a&gt;
        &lt;/p&gt;
    &lt;?php } ?&gt;
&lt;/div&gt;
</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (18.0148)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (16.922)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (13.9492)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (9.70413)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (8.06489)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WordPress 2.9 Post Thumbnail Function</title>
		<link>http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/</link>
		<comments>http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 01:26:24 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1392</guid>
		<description><![CDATA[WordPress 2.9 brings a new function for users of gallery&#8217;s the add_theme_support(&#8216;post-thumbnails&#8217;) function. with this you will get a new item on your new post window named Post Thumbnail (see right).  After you have added a post Thumbnail to a post, you need to display it.  By using a &#8220;gallery&#8221; category, creating the below two files (or adding the code to files) and editing your category.php file, you may display a custom gallery page. See a example here To start,...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (29.3979)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (17.5591)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (13.6935)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (12.1895)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (10.2783)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://mattrude.com/wp-content/uploads/2009/08/post_thumbnail.png"><img class="alignright size-full wp-image-1391" title="post_thumbnail" src="http://mattrude.com/wp-content/uploads/2009/08/post_thumbnail.png" alt="post_thumbnail" width="308" height="74" /></a>WordPress 2.9 brings a new function for users of gallery&#8217;s the <em>add_theme_support(&#8216;post-thumbnails&#8217;)</em> function. with this you will get a new item on your new post window named <strong>Post Thumbnail </strong>(<em>see right</em>).  After you have added a post Thumbnail to a post, you need to display it.  By using a &#8220;gallery&#8221; category, creating the below two files (or adding the code to files) and editing your category.php file, you may display a custom gallery page.</p>
<ul>
<li><a href="http://mattrude.com/category/gallery/" target="_blank">See a example here</a></li>
</ul>
<p>To start, create a new file named <em>gallery-function.php</em> and add the following code to it, this file should live in the root of your current theme&#8217;s directory.</p>
<p><strong>gallery-function.php</strong></p>
<pre>&lt;link rel="stylesheet" href="&lt;?php bloginfo('template_url'); ?&gt;gallery-function.css" type="text/css" media="screen" /&gt;
&lt;div id="gallerypost-&lt;?php the_ID(); ?&gt;"&gt;
    &lt;div id="gallerypost_main-&lt;?php the_ID(); ?&gt;"&gt;
	&lt;div id="gallerypost_thumbnail-&lt;?php the_ID(); ?&gt;"&gt;
		&lt;?php post_thumbnail(); ?&gt;
	&lt;/div&gt;
	&lt;div id="gallerypost_body-&lt;?php the_ID(); ?&gt;"&gt;
		&lt;?php $images =&amp; get_children( 'post_type=attachment&amp;post_mime_type=image' ); ?&gt;
		&lt;h2&gt;&lt;a rel="bookmark" href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
		&lt;div&gt;&lt;small&gt;Posted by &lt;?php the_author_posts_link(); ?&gt; on &lt;?php the_time('F jS, Y') ?&gt;&lt;/small&gt;&lt;/div&gt;
		&lt;div&gt;
			&lt;?php the_excerpt(); ?&gt;
		&lt;/div&gt;
	&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id="gallerypost_sub-&lt;?php the_ID(); ?&gt;"&gt;
	&lt;div id="gallerypost_sub_left-&lt;?php the_ID(); ?&gt;"&gt;
		&lt;p&gt;&lt;?php echo get_the_term_list( $post-&gt;ID, 'people', 'Who: ', ', ', '&lt;br /&gt;' ); ?&gt;&lt;/p&gt;
		&lt;p&gt;&lt;?php echo get_the_term_list( $post-&gt;ID, 'events', 'What: ', ', ', '&lt;br /&gt;' ); ?&gt;&lt;/p&gt;
             	&lt;p&gt;&lt;?php echo get_the_term_list( $post-&gt;ID, 'places', 'Where: ', ', ', '' ); ?&gt;&lt;/p&gt;
	&lt;/div&gt;
	&lt;div id"gallerypost_sub_right-&lt;?php the_ID(); ?&gt;"&gt;
		This Album contains &lt;?php echo $wpdb-&gt;get_var( "SELECT COUNT(*) FROM $wpdb-&gt;posts WHERE post_parent = '$post-&gt;ID' AND post_type = 'attachment'" ); ?&gt; items.
	&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p>Next create a file named <em>gallery-function.css</em> and also add it to our current theme&#8217;s root directory.<br />
<strong>gallery-function.css</strong></p>
<pre>.gallerypost {
        background-color:#fff;
        display: block;
        hNeight: 300px;
        margin: 0px 0px 10px 0px;
        padding: 20px 10px 10px 10px;
        overflow: hidden;
        border-bottom: 1px solid #D2C4A2;
        }
.gallerypost_body {
        float: right;
        width: 430px;
        margin: 0 20px 0 0;
        }
.gallerypost_body p {
        margin: 50px 0px 0px 0px;
        }
.gallerypost_body .entry p {
        margin: 0px 0px 0px 0px;
        }
.gallerypost_body .entry {
        margin: 0px 0px 0px 0px;
        }
.gallerypost_main {
        width: 690px;
        }
.gallerypost_sub {
        display: block;
        padding: 210px 0px 0px 10px;
        }
.gallerypost_sub {
        display: block;
        padding: 210px 0px 0px 10px;
        }
.gallerypost_sub p {
        vertical-align: bottom;
        margin: 0;
        }
.gallerypost_sub_left {
        width: 220px;
        display: block;
        float: left;
        }
.gallerypost_sub_right {
        width: 220px;
        display: block;
        float: right;
        }
.gallerypost_thumbnail {
        float: left;
        }
.gallerypost_thumbnail img {
        margin: 0 0 0 10px;
        color: #000;
        }</pre>
<p>And lastly you will need to add the following to your <em>functions.php</em> file in your current theme&#8217;s root directory (you may add it anywhere in <em>functions.php</em>).</p>
<pre>add_theme_support('post-thumbnails');
set_post_thumbnail_size(200, 200);</pre>
<p>Now that we have our functions built, we need to add some code to your <em>category.php</em> file.</p>
<p>Right after:</p>
<pre>&lt;?php while (have_posts()) : the_post(); ?&gt;</pre>
<p>Add the following code.  This will display the <em>gallery-function.php</em> code when a post is in the &#8220;gallery&#8221; category.</p>
<pre>&lt;? if ( is_category( 'gallery' )) {
                    include('gallery-index.php');
               } else { ?&gt;</pre>
<p>Next Before:</p>
<pre>&lt;?php endwhile; ?&gt;</pre>
<p>Add the following to close the if statement.</p>
<pre>&lt;?php } ?&gt;</pre>
<p>And that should do it, you should now see the post image on the gallery category page similar to below.</p>
<p><a href="http://mattrude.com/wp-content/uploads/2009/10/Gallery-screenshot.jpg"><img class="alignnone size-full wp-image-1420" title="Gallery-screenshot" src="http://mattrude.com/wp-content/uploads/2009/10/Gallery-screenshot.jpg" alt="Gallery-screenshot" width="678" height="246" /></a></p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (29.3979)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (17.5591)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (13.6935)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (12.1895)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (10.2783)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Postfix: remap from addresses with a generic map</title>
		<link>http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/</link>
		<comments>http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 16:27:30 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1366</guid>
		<description><![CDATA[Depending on the software you are using, you may need to change the outbound (from) address of outbound email.  In this How-To, we will change the outbound email address from &#8220;apache@example.com&#8221; to &#8220;webmaster@example.com&#8221;. To start out, go to your postfix directory and modify/create your generic file.  Your generic file will map the two addresses to each other.  At the end of your generic file add a space or tab seperated file simmiler to this. apache@example.com         webmaster@example.com Once you have added...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (21.4516)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (18.5942)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (11.3151)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.1835)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (7.5205)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Depending on the software you are using, you may need to change the outbound (from) address of outbound email.  In this How-To, we will change the outbound email address from &#8220;apache@example.com&#8221; to &#8220;webmaster@example.com&#8221;.</p>
<p>To start out, go to your postfix directory and modify/create your generic file.  Your generic file will map the two addresses to each other.  At the end of your generic file add a space or tab seperated file simmiler to this.</p>
<pre>apache@example.com         webmaster@example.com</pre>
<p>Once you have added the entries to your generic file, you need to hash the file so postfix may quickly access it.</p>
<pre>postmap /etc/postfix/generic</pre>
<p>After you map has been created, you will need to add the entry to your main.cf file to tell Postfix to use your generic map.</p>
<pre>smtp_generic_maps = hash:/etc/postfix/generic</pre>
<p>Once you have updated your main.cf file, you need to reload postfix</p>
<pre>postfix reload</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (21.4516)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (18.5942)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (11.3151)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.1835)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (7.5205)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wp reCAPTCHA form version 0.1 released</title>
		<link>http://mattrude.com/2009/09/wp-recaptcha-form-version-0-1-released/</link>
		<comments>http://mattrude.com/2009/09/wp-recaptcha-form-version-0-1-released/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 05:54:37 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1207</guid>
		<description><![CDATA[I have released wp-reCAPTCHA version 0.1. This plugin will allows you to also add subjects to your contact form.  Please check it out on it page at http://mattrude.com/projects/wp-recaptcha-form/. Related Posts wp-Gallery2 Image Block post RoundCube Fail2Ban Plugin post Adding a native WordPress gallery Auto Update Script for MiniMyth


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (9.74143)--></li>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (8.15995)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (6.96635)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (5.74512)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>I have released wp-reCAPTCHA version 0.1. This plugin will allows you to also add subjects to your contact form.  Please check it out on it page at <a href="http://mattrude.com/projects/wp-recaptcha-form/" target="_self">http://mattrude.com/projects/wp-recaptcha-form/</a>.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (9.74143)--></li>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (8.15995)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (6.96635)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (5.74512)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/09/wp-recaptcha-form-version-0-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Postfix with SQLite Support</title>
		<link>http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/</link>
		<comments>http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 19:12:05 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1176</guid>
		<description><![CDATA[This How-to will show you how to set up Postfix with SQLite support on a Fedora 11 system.  This will require us to compile Postfix from scratch. Installing the dependences yum -y install sqlite sqlite-devel gcc make patch db4-devel cyrus-sasl-devel echo "postfix:x:89:89::/var/spool/postfix:/sbin/nologin" &#62;&#62; /etc/passwd echo "postdrop:x:90:90::/var/spool/postfix:/sbin/nologin" &#62;&#62; /etc/passwd echo "postfix:x:89:" &#62;&#62; /etc/group echo "postdrop:x:90:" &#62;&#62; /etc/group ln -s /usr/lib/sasl2/ /usr/local/lib/sasl2 Download and Patch Postfix Download and unpack the current Postfix Version. wget http://postfix.energybeam.com/source/official/postfix-2.6.5.tar.gz tar -xzf postfix-2.6.5.tar.gz cd postfix-2.6.5 Download and...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (39.9036)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (12.3964)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (10.4803)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (9.43417)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (9.33669)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>This How-to will show you how to set up Postfix with SQLite support on a Fedora 11 system.  This will require us to compile Postfix from scratch.</p>
<h3><span id="Installing_the_dependences">Installing the dependences </span></h3>
<pre>yum -y install sqlite sqlite-devel gcc make patch db4-devel cyrus-sasl-devel
echo "postfix:x:89:89::/var/spool/postfix:/sbin/nologin" &gt;&gt; /etc/passwd
echo "postdrop:x:90:90::/var/spool/postfix:/sbin/nologin" &gt;&gt; /etc/passwd
echo "postfix:x:89:" &gt;&gt; /etc/group
echo "postdrop:x:90:" &gt;&gt; /etc/group
ln -s /usr/lib/sasl2/ /usr/local/lib/sasl2</pre>
<h3><span id="Download_and_Patch_Postfix">Download and Patch Postfix </span></h3>
<p>Download and unpack the current Postfix Version.</p>
<pre>wget http://postfix.energybeam.com/source/official/postfix-2.6.5.tar.gz
tar -xzf postfix-2.6.5.tar.gz
cd postfix-2.6.5</pre>
<p>Download and Patch Postfix with the SQLite Postfix patch</p>
<pre>wget http://www.treibsand.com/postfix-sqlite/postfix-2.6-20080216_sqlite.patch
patch -ul -d . -p1 &lt; postfix-2.6-20080216_sqlite.patch
echo $?</pre>
<h3><span id="Building_Postfix">Building Postfix </span></h3>
<p><strong>To Build with SQLite Support</strong></p>
<pre>make -f Makefile.init makefiles 'CCARGS=-DHAS_SQLITE -I/usr/local/include' \
'AUXLIBS=-L/usr/local/lib -lsqlite3'
echo $?</pre>
<p><strong>Or to Build with SQLite &amp; TLS Support</strong><br />
Requires:</p>
<pre>yum -y install openssl-devel
make -f Makefile.init makefiles 'CCARGS=-DHAS_SQLITE -I/usr/local/include -DUSE_TLS' \
'AUXLIBS=-L/usr/local/lib -lsqlite3 -lz -lm -lssl -lcrypto'
echo $?</pre>
<p><strong>To Build with SQLite, Dovecot, &amp; TLS Support</strong></p>
<pre>yum -y install openssl-devel dovecot-devel
make makefiles 'CCARGS=-DHAS_SQLITE -I/usr/include/sasl/ -DUSE_SASL_AUTH -DUSE_CYRUS_SASL  -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS' -I/usr/local/include \
   'AUXLIBS=-L/usr/local/lib -lsqlite3 -lz -lm -lssl -lcrypto -lsasl2'
echo $?</pre>
<h3>Compiling Postfix</h3>
<p>Now Compile Postfix</p>
<pre>make
echo $?</pre>
<p><strong>And Install it</strong></p>
<pre>make install</pre>
<h2><span id="Building_the_SQLite_Database">Building the SQLite Database </span></h2>
<p>In order to use the SQLite function, you need a SQLite database.  First using SQLite3 run</p>
<pre>sqlite3 /etc/postfix/postfix.sqlite</pre>
<p>To create the database, then you can copy and past the following scheme into the new database.</p>
<pre>CREATE TABLE alias (
  address varchar(255) NOT NULL,
  goto text NOT NULL,
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1');

CREATE TABLE domain (
  domain varchar(255) NOT NULL,
  description varchar(255) NOT NULL,
  aliases int(10) NOT NULL default '0',
  mailboxes int(10) NOT NULL default '0',
  maxquota bigint(20) NOT NULL default '0',
  quota bigint(20) NOT NULL default '0',
  transport varchar(255) NOT NULL,
  backupmx tinyint(1) NOT NULL default '0',
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1' );

CREATE TABLE mailbox (
  username varchar(255) NOT NULL,
  password varchar(255) NOT NULL,
  name varchar(255) NOT NULL,
  maildir varchar(255) NOT NULL,
  quota bigint(20) NOT NULL default '0',
  domain varchar(255) NOT NULL,
  created datetime NOT NULL default '0000-00-00 00:00:00',
  modified datetime NOT NULL default '0000-00-00 00:00:00',
  active tinyint(1) NOT NULL default '1',
  local_part varchar(255) NOT NULL );</pre>
<p>Then close the database</p>
<pre>.quit</pre>
<p>Or you may download mine from below and use the same scheme work.</p>
<ul>
<li> <a title="Postfix.sqlite" href="http://wiki.mattrude.com/images/1/15/Postfix.sqlite">postfix.sqlite</a></li>
</ul>
<p>Once you have your database file place it in <strong>/etc/postfix/</strong> as something like <strong>/etc/postfix/postfix.sqlite</strong> then run</p>
<pre>chown root:root /etc/postfix/postfix.sqlite
chmod 600 /etc/postfix/postfix.sqlite</pre>
<h2><span id="Configuring_Postfix">Configuring Postfix </span></h2>
<p>Now add the maps to you config.</p>
<p><strong>/etc/postfix/main.cf</strong></p>
<pre>relay_domains = sqlite:/etc/postfix/sqlite_relay_domains_maps.cf
relay_recipient_maps = sqlite:/etc/postfix/sqlite_relay_recipient_maps.cf
virtual_alias_maps = sqlite:/etc/postfix/sqlite_virtual_alias_maps.cf
virtual_mailbox_domains = sqlite:/etc/postfix/sqlite_virtual_domains_maps.cf
virtual_mailbox_maps = sqlite:/etc/postfix/sqlite_virtual_mailbox_maps.cf

virtual_mailbox_base = /var/spool/virtualmailboxes
virtual_minimum_uid= 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000</pre>
<p><strong>sqlite_relay_domains_maps.cf</strong></p>
<pre>dbpath = /etc/postfix/postfix.sqlite
query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '1' AND active = '1'</pre>
<p><strong>sqlite_relay_recipient_maps.cf</strong></p>
<pre>dbpath = /etc/postfix/postfix.sqlite
query = SELECT goto FROM alias WHERE address='%s' AND active = 1</pre>
<p><strong>sqlite_virtual_alias_maps.cf</strong></p>
<pre>dbpath = /etc/postfix/postfix.sqlite
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'</pre>
<p><strong>sqlite_virtual_domains_maps.cf</strong></p>
<pre>dbpath = /etc/postfix/postfix.sqlite
query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'</pre>
<p><strong>sqlite_virtual_mailbox_maps.cf</strong></p>
<pre>dbpath = /etc/postfix/postfix.sqlite
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'</pre>
<h2><span id="Setting_up_a_fresh_install_of_Postfix">Setting up a fresh install of Postfix </span></h2>
<pre>mkdir /var/spool/virtualmailboxes/
echo "virtualmail:x:1000:1000::/var/spool/virtualmailboxes:/sbin/nologin" &gt;&gt; /etc/passwd
echo "virtualmail:x:1000:" &gt;&gt; /etc/group
chmod 700 /var/spool/virtualmailboxes/
chown -R virtualmail:virtualmail /var/spool/virtualmailboxes/
rm -f /usr/lib/sendmail
ln -s /usr/sbin/sendmail /usr/lib/sendmail</pre>
<h2><span id="Adding_SQLite_entry.27s">Adding SQLite entry&#8217;s </span></h2>
<p><strong>First add a Domain</strong></p>
<pre>echo "INSERT INTO domain ( domain, description, transport )
VALUES ( 'laptop.mattrude.com', 'laptops domain', 'virtual' );" |sqlite3 /etc/postfix/postfix.sqlite</pre>
<p><strong> Then add a user</strong></p>
<pre>echo "INSERT INTO mailbox ( username, password, name, maildir, domain, local_part )
VALUES ( 'matt@laptop.mattrude.com', 'password', 'Matt', 'laptop.mattrude.com/matt@laptop.mattrude.com/', 'laptop.mattrude.com', 'matt' );" |sqlite3 /etc/postfix/postfix.sqlite</pre>
<p><strong>Last we need to add the mailboxes alias</strong></p>
<pre>echo "INSERT INTO alias ( address, goto, domain )
VALUES ( 'matt@laptop.mattrude.com', 'matt@laptop.mattrude.com', 'laptop.mattrude.com' );" |sqlite3 /etc/postfix/postfix.sqlite
</pre>
<p>Next, contue on to my <a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/">Dovecot SQLite how-to</a> to finish your email server.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (39.9036)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (12.3964)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (10.4803)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (9.43417)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (9.33669)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RoundCube Regression Testing</title>
		<link>http://mattrude.com/2009/09/roundcube-regression-testing/</link>
		<comments>http://mattrude.com/2009/09/roundcube-regression-testing/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 04:09:20 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[RoundCube]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=967</guid>
		<description><![CDATA[With the release of RoundCube 0.3-stable and all the upgrades that will happen, It feels like a good time to talk about regression testing.  Regression testing is when you test the functions of a peace of software to make sure that your updates didn&#8217;t break any functions.  In RoundCube it takes me about 10 minuets to fully test a site.  Here&#8217;s my check list, yours my vary depending on the plugins your using. Main Screen Read a HTML message from...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (8.27705)--></li>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (8.11587)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (7.14232)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (6.21716)--></li>
		<li><a href="http://mattrude.com/2009/05/restoring-a-windows-2000-profile/" rel="bookmark">Restoring a Windows 2000 Profile</a><!-- (6.15896)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>With the release of <a title="RoundCube's Website" href="http://www.roundcube.net" target="_blank">RoundCube</a> <a href="http://trac.roundcube.net/wiki/Changelog" target="_blank">0.3-stable</a> and all the upgrades that will happen, It feels like a good time to talk about regression testing.  Regression testing is when you test the functions of a peace of software to make sure that your updates didn&#8217;t break any functions.  In RoundCube it takes me about 10 minuets to fully test a site.  Here&#8217;s my check list, yours my vary depending on the plugins your using.</p>
<h3><span id="Main_Screen">Main Screen </span></h3>
<ul>
<li>Read a <strong>HTML</strong> message from the preview panel
<ul>
<li>Confirm the &#8220;<strong>View Header</strong>&#8221; drop down window works with HTML messages</li>
</ul>
</li>
<li>Read a <strong>Plain Text</strong> message from the preview panel
<ul>
<li>Confirm the &#8220;<strong>View Header</strong>&#8221; drop down window works with Plain Text messages</li>
</ul>
</li>
<li>Read a <strong>HTML</strong> message full screen
<ul>
<li>Confirm the &#8220;View Header&#8221; drop down window works with HTML messages</li>
<li>Confirm the &#8220;Read Source&#8221; button works with HTML messages</li>
</ul>
</li>
<li>Read a <strong>Plain Text</strong> message full screen
<ul>
<li>Confirm the &#8220;View Header&#8221; drop down window works with Plain Text messages</li>
<li>Confirm the &#8220;Read Source&#8221; button works with Plain Text messages</li>
</ul>
</li>
<li>Change Message pages</li>
<li>Select <strong>All</strong>, <strong>Unread</strong>, <strong>None</strong> from the bottom center</li>
<li>Is the <strong>quota meter</strong> displaying</li>
<li>Flag (star) a message</li>
<li>Search for a known message value</li>
<li>Move a message from Inbox to a folder</li>
<li>Move a message from a folder to the Inbox</li>
<li>Send a message to an internal account</li>
<li>Send a message to an external account</li>
<li>Add a message via the plus symbol when viewing a message
<ul>
<li> Dose it show up in Personal Settings / Spam / Address Rules</li>
</ul>
</li>
</ul>
<h3><span id="Address_Book">Address Book </span></h3>
<ul>
<li>Add an Address Book entry
<ul>
<li> Dose it show up in Personal Settings / Spam / Address Rules</li>
</ul>
</li>
<li>Change an existing entry</li>
<li>&#8220;<strong>Compose Mail To</strong>&#8221; button, top center</li>
<li>&#8220;<strong>Export Contacts in vCard format</strong>&#8221; button, top center</li>
<li>&#8220;Import Contacts&#8221; button, top center</li>
<li>Delete a contact
<ul>
<li> Dose it delete from Personal Settings / Spam / Address Rules</li>
</ul>
</li>
</ul>
<h3><span id="Personal_Settings_.2F_Folders">Personal Settings / Folders </span></h3>
<ul>
<li>Subscribe to a folder</li>
<li>Unsubscribe from a folder</li>
<li>Add a folder</li>
<li>Delete a folder</li>
</ul>
<h3><span id="Personal_Settings_.2F_Identities">Personal Settings / Identities </span></h3>
<ul>
<li>Add a new &#8220;Identity&#8221;
<ul>
<li>Send a message with this identity</li>
</ul>
</li>
<li>Modify an existing &#8220;Identity&#8221;
<ul>
<li>Send a message with this identity</li>
</ul>
</li>
<li>Delete an Identity</li>
<li>Change <strong>default</strong> Identity&#8217;s</li>
</ul>
<h3><span id="Personal_Settings_.2F_Spam">Personal Settings / Spam </span></h3>
<ul>
<li>Add a new white list entry</li>
<li>Add a new black list entry</li>
<li>Delete a white list entry</li>
<li>Delete a black list entry</li>
</ul>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (8.27705)--></li>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (8.11587)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (7.14232)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (6.21716)--></li>
		<li><a href="http://mattrude.com/2009/05/restoring-a-windows-2000-profile/" rel="bookmark">Restoring a Windows 2000 Profile</a><!-- (6.15896)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/09/roundcube-regression-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allow Logwatch to collect data from OpenVPN&#8217;s logs</title>
		<link>http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/</link>
		<comments>http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 21:46:12 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Logwatch]]></category>
		<category><![CDATA[OpenVPN]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=959</guid>
		<description><![CDATA[To allow Logwatch to check OpenVPN&#8217;s logs running on a Fedora or other Linux system you need to install this script &#38; conf file. In order for this script &#38; config file to work you must disable both log &#38; log-append in the OpenVPN Server Config File. ;log openvpn.log ;log-append openvpn.log The Files are: /etc/logwatch/scripts/openvpn - Logwatch perl module /etc/logwatch/conf/openvpn.conf - Configuration file /etc/logwatch/scripts/openvpn #!/usr/bin/perl ########################################################################## # $Log: openvpn,v $ # Revision 1.0 2005/07/27 17:19:34 hyppo # Filippo Grassilli http://hyppo.com/email.php...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (6.35184)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (5.92981)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (5.25482)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>To allow Logwatch to check OpenVPN&#8217;s logs running on a Fedora or other Linux system you need to install this script &amp; conf file.</p>
<p>In order for this script &amp; config file to work you must disable both <strong>log</strong> &amp; <strong>log-append</strong> in the OpenVPN Server Config File.</p>
<pre>;log          openvpn.log
;log-append   openvpn.log</pre>
<p><strong>The Files are:</strong></p>
<pre>/etc/logwatch/scripts/openvpn      - Logwatch perl module
/etc/logwatch/conf/openvpn.conf    - Configuration file</pre>
<p><strong>/etc/logwatch/scripts/openvpn</strong></p>
<pre>#!/usr/bin/perl
##########################################################################
# $Log: openvpn,v $
# Revision 1.0  2005/07/27 17:19:34  hyppo
# Filippo Grassilli http://hyppo.com/email.php
#
# Written and maintained by:
#    Filippo Grassilli http://hyppo.com/email.php
##########################################################################

use Logwatch ':ip';

$Debug = $ENV{'LOGWATCH_DEBUG'};
$Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
$DoLookup = $ENV{'openvpn_ip_lookup'};
$Detail = $ENV{'openvpn_detail_level'} || $Detail;

if ( $Debug &gt;= 5 ) {
   print STDERR "\n\nDEBUG: Inside OpenVPN Filter \n\n";
}

while (defined($ThisLine = &lt;STDIN&gt;)) {
   if (  # Ignore...
      ($ThisLine =~ /Control Channel/) or
      ($ThisLine =~ /Data Channel (Decrypt|Encrypt|MTU)/) or
      ($ThisLine =~ /TLS: soft reset/) or
      ($ThisLine =~ /reading client specific options/) or
      ($ThisLine =~ /Expected Remote/) or
      ($ThisLine =~ /LZO compression/) or
      ($ThisLine =~ /killed expiring key/) or
      ($ThisLine =~ /Diffie-Hellman initialized/) or
      ($ThisLine =~ /Local Options hash/) or
      ($ThisLine =~ /Replay\-window backtrack/) or
      ($ThisLine =~ /TLS: Initial packet/) or
      ($ThisLine =~ /ip (addr add|link set) dev/) or
      ($ThisLine =~ /Re\-using SSL/) or
      ($ThisLine =~ /MULTI: Learn/) or
      ($ThisLine =~ /Received control message/) or
      ($ThisLine =~ /(Restart pause|process restarting)/) or
      ($ThisLine =~ /Inactivity timeout/) or
      ($ThisLine =~ /CRL CHECK OK/) or
      ($ThisLine =~ /VERIFY OK: nsCertType/) or
      ($ThisLine =~ /\d+:\d+ SIGUSR1\[.*restart/) or
      ($ThisLine =~ /^TCP\/UDP: Closing socket/) or
      ($ThisLine =~ /^UDPv4 link /) or
      ($ThisLine =~ /^TUN\/TAP device /) or
      ($ThisLine =~ /Closing TUN\/TAP interface/) or
      ($ThisLine =~ /Interrupted system call/) or
      ($ThisLine =~ /^TLS-Auth MTU parms/) or
      ($ThisLine =~ /^MULTI:/) or
      ($ThisLine =~ /^ succeeded$/) or
      ($ThisLine =~ /^IFCONFIG POOL/)
   ) {
      # Don't care about these...
   } elsif ( ($ThisLine =~ /^OpenVPN .* built on .*/) ) {
      # OpenVPN version
      chomp($ThisLine);
      $OpenVPNVersion=$ThisLine;
   } elsif ( ($ThisLine =~ /^Initialization Sequence Completed/) ) {
      $StartOpenVPN++;
   } elsif ( ($ThisLine =~ /^SIGTERM.* process exiting/) ) {
      $ShutdownOpenVPN++;
   } elsif ( ($Host,$Cert) = ( $ThisLine =~ /^([^:]*):\d+ VERIFY OK: depth=\d+, (.*)$/ ) ) {
      ## Successful cert exchange
      $FullHost = LookupIP ($Host);
      $CertVerified{$Cert}{$FullHost}++;
   } elsif ( ($Host,$User) = ( $ThisLine =~ /^([^:]*):\d+ \[([^\]]+)\] Peer Connection Init/ ) ) {
      ## x.x.x.x:y [user] Peer Connection Initiated with x.x.x.x:y
      $FullHost = LookupIP ($Host);
      $ClientConnection{$User}{$FullHost}++;
   } elsif ( ($HostUser,$Param) = ( $ThisLine =~ /^([^:]*):\d+ SENT CONTROL \[.*\]: (.*)/ ) ) {
      ## user/x.x.x.x:y SENT CONTROL [user]: xxxx....
      chomp($Param);
      $ClientParam{$HostUser}{$Param}++;
   } else {
      # Report any unmatched entries...
      chomp($ThisLine);
      $OtherList{$ThisLine}++;
   }
}

#######################################

if ( ( $Detail &gt;= 5 ) and ($StartOpenVPN) ) {
   if ($OpenVPNVersion) { print "$OpenVPNVersion\n"; }
   print "OpenVPN started/reloaded: $StartOpenVPN Time(s)\n";
}
if ( ( $Detail &gt;= 5 ) and ($ShutdownOpenVPN) ) {
   print "OpenVPN shutdown: $ShutdownOpenVPN Time(s)\n";
}

if ( ( $Detail &gt;= 5 ) and (keys %ClientConnection) ) {
   print "\nOpenVPN Client Connections:\n";
   foreach $ThisOne (sort {$a cmp $b} keys %ClientConnection) {
      print "   $ThisOne:\n";
      foreach $Message (sort {$a cmp $b} keys %{$ClientConnection{$ThisOne}}) {
         print "       $Message: $ClientConnection{$ThisOne}{$Message} Time(s)\n";
      }
   }
}
if ( ( $Detail &gt;= 5 ) and (keys %ClientParam) ) {
   print "\nOpenVPN Client Connection Parameters:\n";
   foreach $ThisOne (sort {$a cmp $b} keys %ClientParam) {
      print "   $ThisOne:\n";
      foreach $Message (sort {$a cmp $b} keys %{$ClientParam{$ThisOne}}) {
         print "       $Message: $ClientParam{$ThisOne}{$Message} Time(s)\n";
      }
   }
}
if ( ( $Detail &gt;= 5 ) and (keys %CertVerified) ) {
   print "\nCertificates verified:\n";
   foreach $ThisOne (sort {$a cmp $b} keys %CertVerified) {
      ($Crt1,$Crt2) = ( $ThisOne =~ /^\/(.*)\/OU=(.*)$/ );
      # print " $ThisOne:\n";
      print " $Crt1\n OU=$Crt2:\n";
      foreach $Client (sort {$a cmp $b} keys %{$CertVerified{$ThisOne}}) {
         print "       $Client: $CertVerified{$ThisOne}{$Client} Time(s)\n";
      }
   }
}

if (keys %OtherList) {
   print "\n**Unmatched Entries**\n";
   foreach $line (sort {$a cmp $b} keys %OtherList) {
      print "   $line: $OtherList{$line} Time(s)\n";
   }
}

exit(0);</pre>
<p><strong>/etc/logwatch/conf/openvpn.conf</strong></p>
<pre>###########################################################################
# $Id: openvpn.conf,v 1.0 2005/07/27 17:08:09 hyppo Exp $
# Written and maintained by:
#    Filippo Grassilli &lt;http://hyppo.com/email.php&gt;
###########################################################################

Title = "OpenVPN"

# Which logfile group...
LogFile = messages

# Whether or not to lookup the IPs into hostnames...
# Setting this to Yes will significantly increase runtime
$openvpn_ip_lookup = Yes
$openvpn_detail_level = 5

# Only give lines pertaining to the named service...
*OnlyService = openvpn
*RemoveHeaders
</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (6.35184)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (5.92981)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (5.25482)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the Time Zone on Fedora from the shell</title>
		<link>http://mattrude.com/2009/08/setting-the-time-zone-on-fedora-from-the-shell/</link>
		<comments>http://mattrude.com/2009/08/setting-the-time-zone-on-fedora-from-the-shell/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 20:13:15 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Webserver]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=703</guid>
		<description><![CDATA[By default Fedora set&#8217;s the timezone to UTC, during the install you may change this. But, if you move a server or forget to set the timezone during install.  You may change it after the fact. Lately I  moved a system from the EST to CST (From Virginia to Minneapolis).  Since this was a webserver, there is no GUI installed (wasting memory).  So I connected to the system via SSH and ran the following command: cp /usr/share/zoneinfo/America/Chicago /etc/localtime All your...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (7.71245)--></li>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (6.90835)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.86022)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (5.94535)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (5.46268)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>By default <a href="http://fedoraproject.org" target="_blank">Fedora</a> set&#8217;s the timezone to UTC, during the install you may change this. But, if you move a server or forget to set the timezone during install.  You may change it after the fact.</p>
<p>Lately I  moved a system from the EST to CST (From Virginia to Minneapolis).  Since this was a webserver, there is no GUI installed (wasting memory).  So I connected to the system via SSH and ran the following command:</p>
<pre>cp /usr/share/zoneinfo/America/Chicago /etc/localtime</pre>
<p>All your really doing is copy the timezone info for Chicago, into the local systems clock.</p>
<p>To get a list of your time zone, on Fedora, go to your &#8220;/usr/share/zoneinfo&#8221; directory and list the contents.</p>
<pre>cd /usr/share/zoneinfo/
ls</pre>
<p>This will give you a list of all the top level regions, find yours and go into it.</p>
<pre>cd America</pre>
<p>Now find the city that&#8217;s closest to you and in your same timezone.</p>
<p>So if your in the Central time zone, copy the Chicago file into your &#8220;/etc/localtime&#8221; file</p>
<pre>cp Chicago /etc/localtime</pre>
<p>now check to make sure it all worked.</p>
<pre>$ date
Sun Aug 23 15:10:03 CDT 2009</pre>
<p>Since this system is  in Minneapolis, and Minneapolis is in the CST/CDT I&#8217;m good to go.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (7.71245)--></li>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (6.90835)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.86022)--></li>
		<li><a href="http://mattrude.com/2010/05/git-commit-email-notifications/" rel="bookmark">Git Commit eMail Notifications</a><!-- (5.94535)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (5.46268)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/setting-the-time-zone-on-fedora-from-the-shell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding a native WordPress gallery</title>
		<link>http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/</link>
		<comments>http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:16:32 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=585</guid>
		<description><![CDATA[I have heard a lot of talk lately of people complaining that they are unable to have image gallery&#8217;s in WordPress 2.8= without adding a plugin.  I assume this assumption comes from how hard it is to see what you can do when it comes to the gallery functions built into WordPress.   If you look at my gallery page, you will see a simple native WordPress gallery.  This gallery was built threw the theme but uses WordPress as it&#8217;s backend....


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (19.5535)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (17.3342)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (16.1053)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (13.9758)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (11.9639)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>I have heard a lot of talk lately of people complaining that they are unable to have image gallery&#8217;s in WordPress 2.8= without adding a plugin.  I assume this assumption comes from how hard it is to see what you can do when it comes to the gallery functions built into WordPress.   If you look at my <a href="http://mattrude.com/category/gallery/" target="_blank">gallery page</a>, you will see a simple native WordPress gallery.  This gallery was built threw the theme but uses WordPress as it&#8217;s backend.</p>
<h3>So How do I build a native WordPress gallery?</h3>
<p>Well there&#8217;s two parts to accomplishing this successfully, but I&#8217;m only going to show you the first part in this post.  First you need to create a Category for all your gallery posts to be filed under. This Category may be named anything you would like it to be named.  I&#8217;m going to stick with the simple name of &#8216;Gallery&#8217;.  You will need some posts to be filed under it.  Create a new post as you normally would.  It is best to put some text to tell you readers what this gallery is all about, but that&#8217;s not needed.</p>
<p>Once you are ready to create your gallery, switch the editer from &#8216;Visual&#8217; mode to &#8216;HTML&#8217; mode (on the top right).  Once in &#8216;HTML&#8217; mode, enter:</p>
<pre>[ gallery ]</pre>
<p><em>note: there should be no space between the brackets and the word &#8216;gallery&#8217; (if I were to enter this line on my page, without the spaces, I would create a gallery).</em></p>
<p>Now switch back to the &#8216;Visual&#8217; mode and you should see a new yellow box in your post box with an image of a camera with a photograph behind it.  If you move your mouse over this new yellow box, two new icons will appear.  From this point, just upload photos to your site and save it.</p>
<p>After you have uploaded your images, save the post and check it out on your website.  Depending on your theme, you should see a nice full gallery on your page, or as I have, just a single thumbnail on your index page, but the full gallery on the posts page.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (19.5535)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (17.3342)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (16.1053)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (13.9758)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (11.9639)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying one category on your WordPress main page</title>
		<link>http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/</link>
		<comments>http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 01:33:20 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=624</guid>
		<description><![CDATA[If you would like to only display a single category on your WordPress main page, here&#8217;s how you do it. You will need to start out by getting ID of the category you wish to display.   In WordPress 2.7+,  start out by going to your categories tab under posts(1), then hover over the category you would like to display in your post(2), don&#8217;t click on it, just hover over it.  On the bottom of your screen, you will be shown...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (15.3815)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (15.3704)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (9.22072)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (8.90353)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (6.65126)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>If you would like to only display a single category on your WordPress main page, here&#8217;s how you do it.  You will need to start out by getting ID of the category you wish to display.   In WordPress 2.7+,  start out by going to your categories tab under posts(1), then hover over the category you would like to display in your post(2), don&#8217;t click on it, just hover over it.  On the bottom of your screen, you will be shown then URL of the category your hover over(3), remember the ID number that being displayed.   In the below example the number we need to remember is &#8220;23&#8243;.</p>
<p style="text-align: left;"><a href="http://mattrude.com/wp-content/uploads/2009/08/Getting-Category-id.jpg"><img class="aligncenter size-full wp-image-629" title="Getting Category id" src="http://mattrude.com/wp-content/uploads/2009/08/Getting-Category-id.jpg" alt="Getting Category id" width="499" height="227" /></a></p>
<p style="text-align: left;">After you have gotten your categories ID number, you will next need to change your index.php file.  In your index.php file look for the line with &#8220;have_post&#8221; and add the below code after.</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<pre>&lt;?php if (have_posts()) : ?&gt;; \\Look for this line and add below
&lt;?php query_posts('showposts=10&amp;amp;;cat=23'); ?&gt;;
&lt;?php while (have_posts()) : the_post(); ?&gt;;
</pre>
<p>Last, change &#8220;cat&#8221; to the category id from above. &#8220;showposts&#8221; is the number of posts to display on the page.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (15.3815)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (15.3704)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (9.22072)--></li>
		<li><a href="http://mattrude.com/2009/07/wordpress-themes-random-image-header/" rel="bookmark">WordPress Themes &#8211; Random Image Header</a><!-- (8.90353)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (6.65126)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Playing with oEmbed</title>
		<link>http://mattrude.com/2009/08/playing-with-oembed/</link>
		<comments>http://mattrude.com/2009/08/playing-with-oembed/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:53:23 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mattrude.com/?p=1458</guid>
		<description><![CDATA[As some of you know, WordPress 2.9 will have oEmbed as one of it&#8217;s core features.  With oEmbed, you are able to add any oEmbed link to a WordPress post by just adding the URL on it&#8217;s own line in your post.  So the below example was added by adding: http://vimeo.com/7058755 When the above link is on it&#8217;s own line you will not see the URL, but you will see the movie. (Note: the above link was added by adding...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (9.53651)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (6.8784)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (6.18154)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (6.08691)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (5.86386)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>As some of you know, WordPress 2.9 will have <a href="http://oembed.com/" target="_blank">oEmbed</a> as one of it&#8217;s core features.  With oEmbed, you are able to add any oEmbed link to a WordPress post by just adding the URL on it&#8217;s own line in your post.  So the below example was added by adding:</p>
<pre>http://vimeo.com/7058755</pre>
<p>When the above link is on it&#8217;s own line you will not see the URL, but you will see the movie. <em><small>(Note: the above link was added by adding the &lt;pre&gt; tags around the link.)</small></em></p>
<p><object type="application/x-shockwave-flash" data="http://vimeo.com/moogaloop.swf" width="640" height="360"><param name="allowscriptaccess" value="always"/><param name="allowfullscreen" value="true"/><param name="movie" value="http://vimeo.com/moogaloop.swf"/><param name="flashvars" value="clip_id=7058755&#038;server=vimeo.com&#038;fullscreen=1&#038;show_title=1&#038;show_byline=1&#038;show_portrait=1&#038;color=00ADEF"/></object></p>
<p>And there you have it, a nicely embedded movie directly in your post.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (9.53651)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (6.8784)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (6.18154)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (6.08691)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (5.86386)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/playing-with-oembed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing and Syncing a Subversion Repository with Git</title>
		<link>http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/</link>
		<comments>http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 22:20:19 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=543</guid>
		<description><![CDATA[Importing a Subversion repository is such a way that you may still sync the changes back in forth, is really just to simple. This how-to assumes you existing repository is running is SVN and you wish to switch it over to git. Similar to how you may create a new SVN directory from a remote repo with svn, by running a command similar too: svn checkout https://svn.example.com/svn/project_name You may run the following to command to download the same remote repository,...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (16.1235)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (11.6455)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (10.6581)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (10.5016)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (9.68015)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Importing a Subversion repository is such a way that you may still sync the changes back in forth, is really just to simple.  This how-to assumes you existing repository is running is SVN and you wish to switch it over to git.</p>
<p>Similar to how you may create a new SVN directory from a remote repo with svn, by running a command similar too:</p>
<pre>svn checkout https://svn.example.com/svn/project_name</pre>
<p>You may run the following to command to download the same remote repository, but then create an git repository and import the data from the svn repo.</p>
<pre>git svn clone https://svn.example.com/svn/project_name</pre>
<p>This will create a new directory named project_name with all your svn history.</p>
<p>Git is vary fast, but when it&#8217;s slow, it&#8217;s slow. The above process can take quite a bit of time (wordpress.org&#8217;s current trunk will take hours) to complete on an older (more comments not slower) repository since it checks in each comment at a time. If you don&#8217;t need the all the history of the project but just need a way to keep your self up to date as you code, you may just download the current revision tag.  So to  download SVN version 1234 and clone it into git, run:</p>
<pre>git svn clone -r 1234 https://svn.example.com/svn/project_name</pre>
<p>If you would like some of the history you can get that also, so if you would like say the last 234 commits run:</p>
<pre>git svn clone -r 1000:1234 https://svn.example.com/svn/project_name</pre>
<p>Then, to update your git repo once the SVN repository has been committed to, run</p>
<pre>git svn fetch</pre>
<p>That should ouput something like:</p>
<pre>r1235 = 340621340d856d805714e9bd86fdb11777f710fe (git-svn)
 M    includes/deprecated.php
 M    includes/functions.php</pre>
<p>You may now follow the <a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Creating a secure git repository</a> how-to and create a remote server.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (16.1235)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (11.6455)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (10.6581)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (10.5016)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (9.68015)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH with no password</title>
		<link>http://mattrude.com/2009/07/ssh-with-no-password/</link>
		<comments>http://mattrude.com/2009/07/ssh-with-no-password/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 04:04:15 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=533</guid>
		<description><![CDATA[When working with different Linux/Unix servers, or when working with a Secure GIT repo, life is much easier after you have setup an SSH public &#38; private keys.  Setting up a public &#38; private key is really pretty simple. Start out by create a public &#38; private key. ssh-keygen -t dsa You will now be prompted for a location and a few other options, the best anwser is the default, so just enter threw these.  You will also be asked...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (23.4998)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (15.2436)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (9.45967)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (8.457)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (8.1097)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>When working with different Linux/Unix servers, or when working with a <a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/">Secure GIT repo</a>, life is much easier after you have setup an SSH public &amp; private keys.  Setting up a public &amp; private key is really pretty simple.</p>
<p>Start out by create a public &amp; private key.</p>
<pre>ssh-keygen -t dsa</pre>
<p>You will now be prompted for a location and a few other options, the best anwser is the default, so just enter threw these.  You will also be asked to create a password, creating a password at this step will require you to enter the password every time you wish to use the key, so best bet is to just enter threw those questions also.  After you have created your new key, go into your &#8220;.ssh&#8221; folder (note the . before ssh) and copy your public key to remote servers.</p>
<pre>cd .ssh</pre>
<p>Next we want to rename the public key so we wont confuse it after sending it to the world.</p>
<pre>cp id_dsa.pub matt_dsa.pub</pre>
<p>Wonderful, now all we need to do is copy the public key to a remote server</p>
<pre>scp matt_dsa.pub remote_server.example.com:~/.ssh</pre>
<p>Note, the above example copies the public into the remote server&#8217;s .ssh folder, if the server dose not have a .ssh folder, you may need to create it.  After the public key has been copied, we need to put it into the &#8220;authorized_keys&#8221; file.</p>
<pre>cat matt_dsa.pub &amp;amp;gt;&amp;amp;gt; authorized_keys</pre>
<p>and that&#8217;s it, just exit out of your remote server, and try to connect again, it should not ask you for a password, but just now connect.  If you are using this your git account, just copy this key into the git&#8217;s users authorized_keys file.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/01/enable-ssh-no-password-authorization-with-freenas/" rel="bookmark">Enable SSH Key Authorization on FreeNAS</a><!-- (23.4998)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (15.2436)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (9.45967)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (8.457)--></li>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (8.1097)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/07/ssh-with-no-password/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating a secure Git repository server</title>
		<link>http://mattrude.com/2009/07/creating-a-secure-git-repository-server/</link>
		<comments>http://mattrude.com/2009/07/creating-a-secure-git-repository-server/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 01:40:32 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=462</guid>
		<description><![CDATA[Creating a secure git repository server is a pretty simple process.  Basically we will be using SSH to transmit the data over an encrypted channel.  SSH will handle all the authentication and data encryption.  So the first set is creating a user for git to use and creating the git users ssh key. On your server, from a privileged account, create a user (were going to use git). adduser git passwd git The configuration we will be setting up will...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (24.4039)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (21.3044)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (20.4783)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (18.4647)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (15.481)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Creating a secure git repository server is a pretty simple process.  Basically we will be using SSH to transmit the data over an encrypted channel.  SSH will handle all the authentication and data encryption.  So the first set is creating a user for git to use and creating the git users ssh key.</p>
<p>On your server, from a privileged account, create a user (were going to use git).</p>
<pre>adduser git
passwd git</pre>
<p>The configuration we will be setting up will store the actual repositories in the git users home directory.  If you don&#8217;t like it&#8217;s current location, you may modify the /etc/passwd file for your user.</p>
<p>Once we have the user setup, in it&#8217;s home directory we need to create our first repository.  Start out by creating the folder, then well go into it and create the git repository files.</p>
<pre>mkdir new-project.git
cd new-project.git
git init --bare</pre>
<p>With the repository now setup go back to your desktop/laptop system (linux/unix).</p>
<p>From your desktop system, create a empty repository or go  to an existing git repo.  If you are going to be adding an existing repo, it may not be connected to any other remote repository.  if you clone it from a remote source (a directory on the same system counts as a remote source) you will need to modify the repository&#8217;s config file and remove those entry&#8217;s, look in the config file under the .git (note the &#8216;dot&#8217;) directory.</p>
<p>To create an empty repository, create a directory for the repository, go into it and init the repo.</p>
<pre>mkdir new-project.git
cd new-project.git
git init</pre>
<p>Since you need something in your repo, and git likes having a readme file (or gitweb dose) let&#8217;s create a readme file and commit it.</p>
<pre>touch README
git add README
git commit -m 'Added README file, first commit'</pre>
<p>Now that we have a commit in our repo, we can add the newly created git repo server and push our new repo to it.</p>
<p>We will start by adding the server to the repo&#8217;s configuration.</p>
<pre>git remote add origin git@new-git-server.example.com:new-project.git</pre>
<p>The above example assumes you&#8217;re server&#8217;s name is &#8220;new-git-server.example.com&#8221; and your using a project named &#8220;new-project.git&#8221; for the user &#8220;git&#8221;.  But it also assumes that your repo is directly in the user git&#8217;s home directory. If you store your repo&#8217;s in a different directory, you will need to add the list folders after the colon.</p>
<p>After you have successfully added the server, push your new repository to the server.</p>
<pre>git push origin master</pre>
<p>You may now be asked for the git user&#8217;s password, enter it, and your repository should be transferred.</p>
<p>Also check out how to <a href="http://mattrude.com/2009/07/ssh-with-no-password/">setup a ssh public/private key</a> where no password is required, only the private key on your client system.</p>
<p>The above may look like a lot, but it&#8217;s really pretty simple to setup.  If you have any problems or questions abut this How-To, please leave a comment or <a href="/contact-me/" target="_blank">contact me</a>.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2010/03/git-cheat-sheet/" rel="bookmark">Git Cheat Sheet</a><!-- (24.4039)--></li>
		<li><a href="http://mattrude.com/2009/08/importing-and-syncing-a-subversion-repository-with-git/" rel="bookmark">Importing and Syncing a Subversion Repository with Git</a><!-- (21.3044)--></li>
		<li><a href="http://mattrude.com/2010/01/run-a-secure-git-repository-on-freenas/" rel="bookmark">Run a Secure git Repository on FreeNAS</a><!-- (20.4783)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (18.4647)--></li>
		<li><a href="http://mattrude.com/2009/07/ssh-with-no-password/" rel="bookmark">SSH with no password</a><!-- (15.481)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/07/creating-a-secure-git-repository-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>wp-Gallery2 Image Block post</title>
		<link>http://mattrude.com/2009/07/wp-gallery2-image-block/</link>
		<comments>http://mattrude.com/2009/07/wp-gallery2-image-block/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 16:13:07 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=388</guid>
		<description><![CDATA[The wp-Gallery2 Image Block plugin will allow you to put one of the many Gallery2 Image Blocks on your WordPress site.  You are required to have a running Gallery2 install to use this plugin. This is a complete rewrite of Chris Schierer (aka Lentil) Gallery2 Image Block Plugin 0.1.4.  This rewrite uses the new WordPress 2.8 Widget API, so is only compatible with WordPress 2.8+. All options described in the Gallery 2 Image Block documentation are included. User configuration of...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (15.5148)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (13.5935)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (11.9681)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (11.8056)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (10.0467)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>The <strong>wp-Gallery2 Image Block </strong>plugin will allow you to put one of the many Gallery2 Image Blocks on your WordPress site.  You are required to have a running <a href="http://gallery.menalto.com/">Gallery2</a> install to use this plugin.</p>
<p>This is a complete rewrite of <a href="http://www.theschierers.net/blog/">Chris Schierer (aka Lentil)</a> Gallery2 Image Block Plugin 0.1.4.  This rewrite uses the new WordPress 2.8 Widget API, so is only compatible with WordPress 2.8+.</p>
<p>All options described in the <a href="http://codex.gallery2.org/Gallery2:Modules:imageblock">Gallery 2 Image Block</a> documentation are included.</p>
<p>User configuration of Image Block options is available through the Widget configuration panel.  Blank (empty) options use the Gallery2 defaults.</p>
<p><strong>Note:</strong> The widget is written using <a href="http://www.php.net/curl">lib_curl()</a> to avoid url_fopen issues.</p>
<h3>Download</h3>
<ul>
<li><a href="http://mattrude.com/wp-content/uploads/2009/07/wp-gallery2-image-block.0.4.zip">wp-gallery2-image-block </a>- Version 0.4 (2009-July-16)</li>
<li><a href="http://mattrude.com/wp-content/uploads/2009/07/wp-gallery2-image-block.0.3.zip">wp-gallery2-image-block </a>- Version 0.3 (2009-July-15)</li>
<li><a href="http://mattrude.com/wp-content/uploads/2009/07/wp-gallery2-image-block.zip">wp-gallery2-image-block </a>- Version 0.1 (2009-July-12)</li>
</ul>
<h3>Screen Shots</h3>

<a href='http://mattrude.com/2009/07/wp-gallery2-image-block/screenshot-1/' title='wp-Gallery2-Image-Block Dashboard Screen'><img width="102" height="200" src="http://mattrude.com/wp-content/uploads/2009/07/screenshot-1-102x200.png" class="attachment-thumbnail" alt="wp-Gallery2-Image-Block Dashboard Screen" title="wp-Gallery2-Image-Block Dashboard Screen" /></a>
<a href='http://mattrude.com/2009/07/wp-gallery2-image-block/screenshot-2-4/' title='wp-Gallery2-Image-Block Sidebar'><img width="176" height="200" src="http://mattrude.com/wp-content/uploads/2009/07/screenshot-23-176x200.png" class="attachment-thumbnail" alt="wp-Gallery2-Image-Block Sidebar" title="wp-Gallery2-Image-Block Sidebar" /></a>

<h3>Installation</h3>
<p>Extract the zip file and copy the folder wp=gallery2-image-block into your wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (15.5148)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (13.5935)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (11.9681)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (11.8056)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (10.0467)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/07/wp-gallery2-image-block/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>RoundCube Fail2Ban Plugin post</title>
		<link>http://mattrude.com/2009/07/roundcube-fail2ban-plugin/</link>
		<comments>http://mattrude.com/2009/07/roundcube-fail2ban-plugin/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 06:20:48 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[RoundCube]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=370</guid>
		<description><![CDATA[RoundCube Fail2Ban Plugin is a small plugin that will display a failed login attempts to your syslog or userlogins log file. Using this information Fail2Ban be able to block a user for a set amount of time. The best part, the block is happing at the IP level and blocks the IP address, not the user they are try to log in as. Download tgz &#124; zip &#124; git &#8211; Version: 1.0 (2009-Jul-09) Install Place this plugin folder into the...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (32.0359)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (15.5574)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (8.54105)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (8.01494)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (7.2832)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p><strong>RoundCube Fail2Ban Plugin</strong> is a small plugin that will display a failed login attempts to your syslog or userlogins log file. Using this information <a href="http://www.fail2ban.org/wiki/index.php/Main_Page" target="_blank">Fail2Ban</a> be able to block a user for a set amount of time.  The best part, the block is happing at the IP level and blocks the IP address, not the user they are try to log in as.</p>
<h2>Download</h2>
<ul>
<li><a href="http://mattrude.com/wp-content/uploads/2009/07/roundcube-fail2ban-1.0.tgz">tgz</a> | <a href="http://mattrude.com/wp-content/uploads/2009/07/roundcube-fail2ban-1.0.zip">zip</a> | <a href="http://github.com/mattrude/rc-plugin-fail2ban">git</a> &#8211; Version: 1.0 (2009-Jul-09)</li>
</ul>
<h2>Install</h2>
<ul>
<li>Place this plugin folder into the RoundCube plugins directory (roundcube/plugins/)</li>
<li>Add fail2ban to $rcmail_config['plugins'] in your RoundCube config</li>
</ul>
<p><em><strong>Note:</strong> When downloading this plugin from <a href="http://github.com/mattrude/rc-plugin-fail2ban" target="_blank">http://github.com/mattrude/rc-plugin-fail2ban</a> you will need to create a directory called fail2ban and place fail2ban.php in there, ignoring the root directory in the downloaded archive.  You may also run &#8216;git clone git://github.com/mattrude/rc-plugin-fail2ban.git fail2ban&#8217; from the plugins directory.</em></p>
<h2>Fail2Ban Setup</h2>
<p><strong>fail2ban/jail.conf:</strong></p>
<pre>[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
action   = iptables-multiport[name=roundcube, port=&amp;amp;amp;quot;http,https&amp;amp;amp;quot;]
logpath  = /var/www/html/roundcube/logs/userlogins</pre>
<p><strong>fail2ban/filter.d/roundcube.conf:</strong></p>
<pre>[Definition]
failregex = FAILED login for .*. from &lt;HOST&gt;
ignoreregex =</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (32.0359)--></li>
		<li><a href="http://mattrude.com/2009/07/wp-gallery2-image-block/" rel="bookmark">wp-Gallery2 Image Block post</a><!-- (15.5574)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (8.54105)--></li>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (8.01494)--></li>
		<li><a href="http://mattrude.com/2009/11/auto-update-script-for-minimyth/" rel="bookmark">Auto Update Script for MiniMyth</a><!-- (7.2832)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/07/roundcube-fail2ban-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Themes &#8211; Random Image Header</title>
		<link>http://mattrude.com/2009/07/wordpress-themes-random-image-header/</link>
		<comments>http://mattrude.com/2009/07/wordpress-themes-random-image-header/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 01:05:21 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=318</guid>
		<description><![CDATA[While working on a theme for WordPress lately.I ran across the problem of wanting a random header image on the top of the page, but how to do it?  After looking around for a simple, fast script, I ran across, who else, but Matt Mullenweg&#8217;s page. Matt wrote a small, fast script that will look at the content of a directory, then randomly returns the a image&#8217;s URI. In Matt&#8217;s own words: This is your standard random image script that...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (11.311)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (10.9744)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (10.7829)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (10.5625)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (9.56502)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>While working on a theme for WordPress lately.I ran across the problem of wanting a random header image on the top of the page, but how to do it?  After looking around for a simple, fast script, I ran across, who else, but Matt Mullenweg&#8217;s page.</p>
<p>Matt wrote a small, fast script that will look at the content of a directory, then randomly returns the a image&#8217;s URI.</p>
<p>In Matt&#8217;s own words:</p>
<blockquote><p>This is your standard random image script that takes a slightly different approach than most, namely using standard HTTP headers instead of reading the file through the script.</p></blockquote>
<p>So to integrate this script into your page, all you need to do is change the images name to random.php, see below.</p>
<pre>&lt;img title="&lt;?php bloginfo('name'); ?&gt; Random Header Image" src="&lt;?php bloginfo('template_url'); ?&gt;/header1.jpg" alt=""/&gt;</pre>
<p>Change too:</p>
<pre>&lt;img title="&lt;?php bloginfo('name'); ?&gt; Random Header Image" src="&lt;?php bloginfo('template_url'); ?&gt;/rotate.php" alt=""&gt;</pre>
<p>Matt Mullenweg&#8217;s script may be found at: <a href="http://ma.tt/scripts/randomimage/">http://ma.tt/scripts/randomimage</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">This is your standard random image script that takes a slightly different approach than most, namely using standard HTTP headers instead of reading the file through the script.</div>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/10/wordpress-2-9-post-thumbnail-function/" rel="bookmark">WordPress 2.9 Post Thumbnail Function</a><!-- (11.311)--></li>
		<li><a href="http://mattrude.com/2010/07/display-exif-data-on-wordpress-gallery-post-image/" rel="bookmark">Display EXIF Data on WordPress Gallery Post Image</a><!-- (10.9744)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (10.7829)--></li>
		<li><a href="http://mattrude.com/2009/10/next-gallery-image-link-in-image-posts/" rel="bookmark">Next Gallery Image Link in Image Posts</a><!-- (10.5625)--></li>
		<li><a href="http://mattrude.com/2009/08/adding-a-native-wordpress-gallery/" rel="bookmark">Adding a native WordPress gallery</a><!-- (9.56502)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/07/wordpress-themes-random-image-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Self-signed SSL Certificates for Dovecot &amp; Postfix</title>
		<link>http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/</link>
		<comments>http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 14:42:39 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=262</guid>
		<description><![CDATA[Self-signed SSL certificates are the easiest way to get your SSL server working. However unless you take some action to prevent it, this is at the cost of security: The first time the client connects to the server, it sees the certificate and asks the user whether to trust it. The user of course doesn&#8217;t really bother verifying the certificate&#8217;s fingerprint, so a man-in-the-middle attack can easily bypass all the SSL security, steal the user&#8217;s password and so on. If...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (11.0738)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.1052)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (9.09548)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (7.15023)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.56282)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>Self-signed <a title="Openssl" href="http://wiki.mattrude.com/index.php/Openssl">SSL</a> certificates are the easiest way to get your SSL server working. However unless you take some action to prevent it, this is at the cost of security:</p>
<ul>
<li> The first time the client connects to the server, it sees the certificate and asks the user whether to trust it. The user of course doesn&#8217;t really bother verifying the certificate&#8217;s fingerprint, so a man-in-the-middle attack can easily bypass all the SSL security, steal the user&#8217;s password and so on.</li>
<li> If the client was lucky enough not to get attacked the first time it connected, the following connections will be secure as long as the client had permanently saved the certificate. Some clients do this, while others have to be manually configured to accept the certificate.</li>
</ul>
<p>The only way to be fully secure is to import the SSL certificate to client&#8217;s (or operating system&#8217;s) list of trusted CA certificates prior to first connection. See <a title="http://wiki.dovecot.org/SSL/CertificateClientImporting" rel="nofollow" href="http://wiki.dovecot.org/SSL/CertificateClientImporting">SSL/CertificateClientImporting</a> how to do it for different clients.</p>
<h4>Building Dovcot&#8217;s Self-Signed Certificates</h4>
<p>Dovecot includes a script to build self-signed SSL certificates using OpenSSL. First you need to find the <strong>dovecot-openssl.cnf</strong> file.</p>
<ul>
<li><strong>Configuring the Certificate Config File</strong></li>
</ul>
<p>The best way on <a title="Fedora" href="http://wiki.mattrude.com/index.php/Fedora">Fedora</a> to do this is via the <strong>locate</strong> command.</p>
<pre>locate dovecot-openssl.cnf</pre>
<p>Mine was located at <strong>/etc/pki/dovecot/dovecot-openssl.cnf</strong>. Now that you have found the file you need to add your server information to it, like this:</p>
<pre>[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no

[ req_dn ]
# country (2 letter code)
C=US

# State or Province Name (full name)
ST=MN

# Locality Name (eg. city)
L=SaintPaul

# Organization (eg. company)
O=example.com

# Organizational Unit Name (eg. section)
OU=IMAP server

# Common Name (*.example.com is also possible)
CN=*.example.com

# E-mail contact
emailAddress=postmaster@example.com

[ cert_type ]
nsCertType = server</pre>
<ul>
<li><strong>Build the Certificates</strong></li>
</ul>
<pre>/usr/libexec/dovecot/mkcert.sh</pre>
<ul>
<li><strong>Modifying Dovecot</strong></li>
</ul>
<p>You will need to add the following to your <strong>/etc/dovecot.conf</strong> file:</p>
<pre>ssl_listen = 993
ssl_disable = no
ssl_cert_file = /etc/postfix/smtpd.pem
ssl_key_file = /etc/postfix/smtpd.pem
auth_cache_size = 128</pre>
<p>Then restart Dovecot</p>
<pre>/sbin/service dovecot restart</pre>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1014px; width: 1px; height: 1px;">
<pre>gutter='0'</pre>
</div>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (11.0738)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.1052)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (9.09548)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (7.15023)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (6.56282)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuning the number of processes on MacOS X</title>
		<link>http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/</link>
		<comments>http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 12:57:52 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=231</guid>
		<description><![CDATA[MacOS X will run out of process slots when you increase Postfix process limits. The following works with OSX 10.4 and OSX 10.5. MacOS X kernel parameters can be specified in /etc/sysctl.conf. /etc/sysctl.conf: kern.maxproc=2048kern.maxprocperuid=2048 Unfortunately these can&#8217;t simply be set on the fly with sysctl -w. You also have to set the following in /etc/launchd.conf so that the root user after boot will have the right process limit (2048). Otherwise you have to always run ulimit -u 2048 as root,...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (6.97037)--></li>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (5.91885)--></li>
		<li><a href="http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/" rel="bookmark">Allow Logwatch to collect data from OpenVPN&#8217;s logs</a><!-- (5.45227)--></li>
		<li><a href="http://mattrude.com/2009/05/restoring-a-windows-2000-profile/" rel="bookmark">Restoring a Windows 2000 Profile</a><!-- (5.32536)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (5.30019)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>MacOS X will run out of process slots when you increase Postfix process limits. The following works with OSX 10.4 and OSX 10.5. MacOS X kernel parameters can be specified in /etc/sysctl.conf.<br />
<strong></strong></p>
<p><strong>/etc/sysctl.conf:</strong></p>
<pre>kern.maxproc=2048kern.maxprocperuid=2048</pre>
<p>Unfortunately these can&#8217;t simply be set on the fly with <strong>sysctl -w</strong>. You also have to set the following in <strong>/etc/launchd.conf</strong> so that the root user after boot will have the right process limit (2048). Otherwise you have to always run <strong>ulimit -u 2048</strong> as root, then start a user shell, and then start processes for things to take effect.</p>
<p><strong>/etc/launchd.conf:</strong></p>
<pre>limit maxproc 2048</pre>
<p>Once these are in place, reboot the system. After that, the<br />
limits will stay in place.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/11/how-to-disable-tool-tips-in-fedora-12-while-using-gnome/" rel="bookmark">How-To Disable tool-tips in Fedora 12 (while using GNOME)</a><!-- (6.97037)--></li>
		<li><a href="http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/" rel="bookmark">Fail2Ban Setup with RoundCube</a><!-- (5.91885)--></li>
		<li><a href="http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/" rel="bookmark">Allow Logwatch to collect data from OpenVPN&#8217;s logs</a><!-- (5.45227)--></li>
		<li><a href="http://mattrude.com/2009/05/restoring-a-windows-2000-profile/" rel="bookmark">Restoring a Windows 2000 Profile</a><!-- (5.32536)--></li>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (5.30019)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix: Archiving Mail when sent from or to the outside world</title>
		<link>http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/</link>
		<comments>http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/#comments</comments>
		<pubDate>Sat, 30 May 2009 02:56:10 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=221</guid>
		<description><![CDATA[The goal here is to send an BCC message for every email send to or from the outside world, for a group of internal addresses. Use sender_bcc_maps or recipient_bcc_maps. Configure them so that the archive copy is made when the sender is remote OR the receiver is remote. /etc/postfix/main.cf: sender_bcc_maps = pcre:/etc/postfix/archive-check recipient_bcc_maps = pcre:/etc/postfix/archive-check /etc/postfix/archive-check: !/@example\.com$/ archive@example.com This is a predicate transformation, from (NOT (local AND local)), what you asked for, into ((NOT local) OR (NOT local)), shown above....


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (11.3774)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (11.3108)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (10.9359)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.0805)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (6.69494)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>The goal here is to send an BCC message for every email send to or from the outside world, for a group of internal addresses.</p>
<p>Use <strong>sender_bcc_maps</strong> or <strong>recipient_bcc_maps</strong>. Configure them so that the archive copy is made when the sender is remote OR the receiver is remote.</p>
<p><strong>/etc/postfix/main.cf:</strong></p>
<pre>sender_bcc_maps = pcre:/etc/postfix/archive-check
recipient_bcc_maps = pcre:/etc/postfix/archive-check</pre>
<p><strong>/etc/postfix/archive-check:</strong></p>
<pre>!/@example\.com$/        archive@example.com</pre>
<p>This is a predicate transformation, from (NOT (local AND local)), what you asked for, into ((NOT local) OR (NOT local)), shown above.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (11.3774)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (11.3108)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (10.9359)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.0805)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (6.69494)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix: reject an address before queue</title>
		<link>http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/</link>
		<comments>http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:58:28 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=213</guid>
		<description><![CDATA[First start out by creating a file named /etc/postfix/rejected_addresses then add the following to it bad_sender@example.com REJECT This will be an hashed map table, so we need to create the hash postmap /etc/postfix/rejected_addresses Next we need to add the map to our /etc/postfix/main.cffile. We will be adding this to the smtpd_recipient_restrictions section. smtpd_recipient_restrictions = ... check_sender_access hash:/etc/postfix/rejected_addresses, ... reject_unauth_destination Once complete reload postfix postfix reload Related Posts Postfix: allow select users permission to send to a cretin address Postfix: remap...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (17.8862)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (17.5317)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.3292)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (9.90108)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (7.54992)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>First start out by creating a file named <strong>/etc/postfix/rejected_addresses</strong> then  add the following to it</p>
<pre>bad_sender@example.com    REJECT</pre>
<p>This will be an hashed map table, so we need to create the hash</p>
<pre>postmap /etc/postfix/rejected_addresses</pre>
<p>Next we need to add the map to our <strong>/etc/postfix/main.cf</strong>file.  We will be adding this to the <strong>smtpd_recipient_restrictions</strong> section.</p>
<pre>smtpd_recipient_restrictions =
  ...
  check_sender_access hash:/etc/postfix/rejected_addresses,
  ...
  reject_unauth_destination</pre>
<p>Once complete reload postfix</p>
<pre>postfix reload</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/" rel="bookmark">Postfix: allow select users permission to send to a cretin address</a><!-- (17.8862)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (17.5317)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (10.3292)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (9.90108)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (7.54992)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restoring a Windows 2000 Profile</title>
		<link>http://mattrude.com/2009/05/restoring-a-windows-2000-profile/</link>
		<comments>http://mattrude.com/2009/05/restoring-a-windows-2000-profile/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:57:57 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=211</guid>
		<description><![CDATA[If a user logs into a Windows 2000 system, and there profile is missing, the following will help you restore it. In the below how to, you will need to copy the bad profile to a new location, then tell Windows to look there via the registry. 1. Log on to the computer with the user profile that you want to restore. 2. Click Start, and then click Run. 3. Type regedit, and then click OK. 4. In Registry Editor,...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (7.63153)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (7.10504)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (6.936)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (5.38365)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (5.2327)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>If a user logs into a Windows 2000 system, and there profile is missing, the following will help you restore it.  In the below how to, you will need to copy the bad profile to a new location, then tell Windows to look there via the registry.</p>
<table class="prettytable" border="0">
<tbody>
<tr>
<td>1.</td>
<td>Log on to the computer with the user profile that you want to restore.</td>
</tr>
<tr>
<td>2.</td>
<td>Click <strong>Start</strong>, and then click <strong>Run</strong>.</td>
</tr>
<tr>
<td>3.</td>
<td>Type regedit, and then click <strong>OK</strong>.</td>
</tr>
<tr>
<td>4.</td>
<td>In Registry Editor, navigate to the following registry key:<strong>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList</strong></td>
</tr>
<tr>
<td>5.</td>
<td>Locate your user profile folder.<strong>NOTE</strong>: When you open the ProfileList folder, you see several folders, each of which belongs to a different user. These folders are named according to the user security IDs (SIDs) and not according to the user names.To locate your user profile folder, use one of the following options:</p>
<table class="prettytable" border="0">
<tbody>
<tr>
<td>•</td>
<td>For each folder, click the folder, and then look for the <strong>ProfileImagePath</strong> value that contains the path to your user profile (such as %SystemDrive%\Documents and Settings\<em>username</em>).-or-</td>
</tr>
<tr>
<td>•</td>
<td>In Registry Editor, press CTRL+F to start the Find tool. Type your user name in the <strong>Find what</strong> box, click to select the <strong>Data</strong> check box under <strong>Look at</strong>, and then click <strong>Find</strong>.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>6.</td>
<td>After you locate the subkey folder for your user profile, double-click the <strong>ProfileImagePath</strong> value.</td>
</tr>
<tr>
<td>7.</td>
<td>In the <strong>Value data</strong> box, change the path so that it points to the profile folder that you are restoring, and then and click <strong>OK</strong>.</td>
</tr>
<tr>
<td>8.</td>
<td>Quit Registry Editor.</td>
</tr>
</tbody>
</table>
<p>The next time that you log on to the computer, Windows will use your restored user profile.</p>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/creating-a-secure-git-repository-server/" rel="bookmark">Creating a secure Git repository server</a><!-- (7.63153)--></li>
		<li><a href="http://mattrude.com/2010/03/installing-the-git-daemon-for-read-only-access-to-repoistory/" rel="bookmark">Installing the GIT Daemon for Read Only Access to Repoistory</a><!-- (7.10504)--></li>
		<li><a href="http://mattrude.com/2010/01/converting-a-mediawiki-database-from-mysql-to-sqlite/" rel="bookmark">Converting a MediaWiki database from MySQL to SQLite</a><!-- (6.936)--></li>
		<li><a href="http://mattrude.com/2009/08/displaying-only-one-category-on-your-wordpress-main-page/" rel="bookmark">Displaying one category on your WordPress main page</a><!-- (5.38365)--></li>
		<li><a href="http://mattrude.com/2010/05/installing-cgit-web-interface-on-a-fedora-12-server/" rel="bookmark">Installing the git, cgit web interface on a Fedora 12 server</a><!-- (5.2327)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/05/restoring-a-windows-2000-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix: allow select users permission to send to a cretin address</title>
		<link>http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/</link>
		<comments>http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:56:06 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=209</guid>
		<description><![CDATA[So the idea here is to have an email address that you would only like a select few to have access to email to, for example, a everyone or all address. In this example we will be locking down the email address all@example.com and only allow the address abc@example.com to send to it. In /etc/postfix/main.cf add the following: smtpd_restrictions_classes = restricted_recipient note: This is in smtpd_SENDER_restrictions to avoid becoming an open relay because of the &#8220;OK&#8221; below. smtpd_sender_restrictions = check_recipient_access...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (20.4973)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (16.3213)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (9.95015)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (9.46714)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (6.69494)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>So the idea here is to have an email address that you would only like a select few to have access to email to, for example, a everyone or all address. In this example we will be locking down the email address <strong>all@example.com</strong> and only allow the address <strong>abc@example.com</strong> to send to it.</p>
<p>In <strong>/etc/postfix/main.cf</strong> add the following:</p>
<pre>smtpd_restrictions_classes =  restricted_recipient</pre>
<ul>
<li><strong>note:</strong> This is in smtpd_SENDER_restrictions to avoid becoming an open relay because of the &#8220;OK&#8221; below.</li>
</ul>
<pre>smtpd_sender_restrictions =
  check_recipient_access hash:/etc/postfix/restricted_recipient

restricted_recipient =
  check_sender_access hash:/etc/postfix/privileged_sender
  reject</pre>
<p><strong>restricted_recipient:</strong></p>
<pre>all@example.com         restricted_recipient</pre>
<p><strong>privileged_sender:</strong></p>
<pre>abc@example.com         OK</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/05/postfix-reject-an-address-before-queue/" rel="bookmark">Postfix: reject an address before queue</a><!-- (20.4973)--></li>
		<li><a href="http://mattrude.com/2009/09/postfix-remap-from-addresses-with-a-generic-map/" rel="bookmark">Postfix: remap from addresses with a generic map</a><!-- (16.3213)--></li>
		<li><a href="http://mattrude.com/2009/05/postfix-archiving-mail-when-sent-from-or-to-the-outside-world/" rel="bookmark">Postfix: Archiving Mail when sent from or to the outside world</a><!-- (9.95015)--></li>
		<li><a href="http://mattrude.com/2009/09/installing-postfix-with-sqlite-support/" rel="bookmark">Installing Postfix with SQLite Support</a><!-- (9.46714)--></li>
		<li><a href="http://mattrude.com/2009/06/creating-self-signed-ssl-certificates-for-dovecot-postfix/" rel="bookmark">Creating Self-signed SSL Certificates for Dovecot &#038; Postfix</a><!-- (6.69494)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/05/postfix-allow-select-users-permission-to-send-to-a-cretin-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fail2Ban Setup with RoundCube</title>
		<link>http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/</link>
		<comments>http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:55:10 +0000</pubDate>
		<dc:creator>Matt Rude</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[RoundCube]]></category>

		<guid isPermaLink="false">http://www.mattrude.com/?p=207</guid>
		<description><![CDATA[In order for Fail2Ban to be able to ban IP addresses from computers trying to break into RoundCube. RoundCube needs to write the IP address of the offending system in it&#8217;s logs. To accomplish this, run the following patch from the root of your RoundCube directory, or modify the program/lib/imap.inc file directly. program/lib/imap.inc Index: program/lib/imap.inc ============================================================ --- program/lib/imap.inc (revision 2446) +++ program/lib/imap.inc (working copy) @@ -428,7 +428,7 @@ &#38;amp;amp;lt;br /&#38;amp;amp;gt; if ($result == -3) fclose($conn-&#38;amp;amp;gt;fp); // BYE response &#38;amp;amp;lt;br /&#38;amp;amp;gt;...


<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (29.8564)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (8.95192)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.90592)--></li>
		<li><a href="http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/" rel="bookmark">Allow Logwatch to collect data from OpenVPN&#8217;s logs</a><!-- (7.18583)--></li>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (6.35184)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>In order for Fail2Ban to be able to ban IP addresses from computers trying to break into RoundCube.  RoundCube needs to write the IP address of the offending system in it&#8217;s logs.  To accomplish this,  run the following patch from the root of your RoundCube directory, or modify the program/lib/imap.inc file directly.</p>
<p><strong>program/lib/imap.inc</strong></p>
<pre>Index: program/lib/imap.inc
============================================================
--- program/lib/imap.inc        (revision 2446)
+++ program/lib/imap.inc        (working copy)
@@ -428,7 +428,7 @@
&amp;amp;amp;lt;br /&amp;amp;amp;gt;
if ($result == -3) fclose($conn-&amp;amp;amp;gt;fp); // BYE response
&amp;amp;amp;lt;br /&amp;amp;amp;gt;
-    $conn-&amp;amp;amp;gt;error    .= 'Authentication for ' . $user . ' failed (AUTH): &amp;amp;amp;quot;';
+    $conn-&amp;amp;amp;gt;error    .= 'Authentication for ' . $user . ' (' . getenv(&amp;amp;amp;quot;REMOTE_ADDR&amp;amp;amp;quot;) . ') failed (AUTH): &amp;amp;amp;quot;';
$conn-&amp;amp;amp;gt;error    .= htmlspecialchars($line) . '&amp;amp;amp;quot;';
$conn-&amp;amp;amp;gt;errorNum  = $result;</pre>
<p>Once you have RoundCube patched, you may use the below config and filter in Fail2Ban to block the IP address from RoundCube&#8217;s logs.</p>
<p><strong>/etc/fail2ban/jail.conf:</strong></p>
<pre>[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
action   = iptables-multiport[name=roundcube, port=&amp;amp;amp;quot;http,https&amp;amp;amp;quot;]
logpath  = /var/logs/httpd/errors</pre>
<p><strong>/etc/fail2ban/filter.d/roundcube.conf:</strong></p>
<pre>[Definition]
failregex = IMAP Error: Authentication for .* \(&amp;amp;amp;lt;HOST&amp;amp;amp;amp;lg;\) failed \((?:LOGIN|AUTH)\):
ignoreregex =</pre>


<br />
<h3>Related Posts</h3>
<ol>
		<li><a href="http://mattrude.com/2009/07/roundcube-fail2ban-plugin/" rel="bookmark">RoundCube Fail2Ban Plugin post</a><!-- (29.8564)--></li>
		<li><a href="http://mattrude.com/2009/09/roundcube-regression-testing/" rel="bookmark">RoundCube Regression Testing</a><!-- (8.95192)--></li>
		<li><a href="http://mattrude.com/2009/12/installing-dovecot-using-sqlite/" rel="bookmark">Installing Dovecot with SQLite Support</a><!-- (7.90592)--></li>
		<li><a href="http://mattrude.com/2009/08/allow-logwatch-to-collect-data-from-openvpns-logs/" rel="bookmark">Allow Logwatch to collect data from OpenVPN&#8217;s logs</a><!-- (7.18583)--></li>
		<li><a href="http://mattrude.com/2009/06/tuning-the-number-of-processes-on-macos-x/" rel="bookmark">Tuning the number of processes on MacOS X</a><!-- (6.35184)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://mattrude.com/2009/05/fail2ban-setup-with-roundcube/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
