<?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>johker&#039;s blog &#187; Tipps und Tricks</title>
	<atom:link href="http://johker.ibutho.de/category/tipps-und-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://johker.ibutho.de</link>
	<description>stories about me, my life and my trips</description>
	<lastBuildDate>Sun, 18 Dec 2011 11:53:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Thinkpad W510 Suspend</title>
		<link>http://johker.ibutho.de/2011/03/10/thinkpad-w510-suspend/</link>
		<comments>http://johker.ibutho.de/2011/03/10/thinkpad-w510-suspend/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 10:08:22 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[w510]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=310</guid>
		<description><![CDATA[Standardmäßig funktioniert &#8211; zumindest unter Ubuntu 10.10 &#8211; Suspend-to-RAM und Suspend-to-Disk nicht. Um das zu beheben, legt man eine Datei &#8220;/etc/pm/config.d/unload_module&#8221; mit folgendem Inhalt an: SUSPEND_MODULES=&#34;xhci_hcd iwlagn&#34;]]></description>
			<content:encoded><![CDATA[<p>Standardmäßig funktioniert &#8211; zumindest unter Ubuntu 10.10 &#8211; Suspend-to-RAM und Suspend-to-Disk nicht. Um das zu beheben, legt man eine Datei &#8220;<em>/etc/pm/config.d/unload_module</em>&#8221; mit folgendem Inhalt an:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">SUSPEND_MODULES</span>=<span style="color: #ff0000;">&quot;xhci_hcd iwlagn&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2011/03/10/thinkpad-w510-suspend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmieren mit VIM</title>
		<link>http://johker.ibutho.de/2010/11/13/programmieren-mit-vim/</link>
		<comments>http://johker.ibutho.de/2010/11/13/programmieren-mit-vim/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 11:41:48 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[beautify]]></category>
		<category><![CDATA[cheats]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[indent]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=302</guid>
		<description><![CDATA[Mal wieder ein Lebenszeichen von mir VIM ist ja bekanntlich mein Lieblingseditor und deshalb wollte ich hier ein paar &#8220;Cheats&#8221; vorstellen: Einrücken/Ausrücken: 1 2 2&#62;&#62; - 2 Zeilen einrücken 2&#60;&#60; - 2 Zeilen ausrücken Die 2 kann wie immer durch &#8230; <a href="http://johker.ibutho.de/2010/11/13/programmieren-mit-vim/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Mal wieder ein Lebenszeichen von mir <img src='http://johker.ibutho.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  VIM ist ja bekanntlich mein Lieblingseditor und deshalb wollte ich hier ein paar &#8220;Cheats&#8221; vorstellen:</p>
<p>Einrücken/Ausrücken:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="" style="font-family:monospace;"><span style="">2</span>&gt;&gt;			- <span style="">2</span> Zeilen einrücken
<span style="">2</span>&lt;&lt;			- <span style="">2</span> Zeilen ausrücken</pre></td></tr></table></div>

<p>Die 2 kann wie immer durch eine andere Zahl ersetzen, um mehr oder weniger Zeilen ein-/auszurücken.</p>
<p>Block kommentieren:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="" style="font-family:monospace;">STRG+V			- Block markieren
I+//			- Kommentarzeichen <span class="br0">&#40;</span>//<span class="br0">&#41;</span> Zeichen einfügen
Esc			- Kommentarzeichen vor jeder Zeile einfügen</pre></td></tr></table></div>

<p>Block auskommentieren:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="" style="font-family:monospace;">STRG+V			- Kommentarzeichen <span class="br0">&#40;</span>//<span class="br0">&#41;</span> markieren
x			- Kommentarzeichen löschen</pre></td></tr></table></div>

<p>Suche:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="" style="font-family:monospace;">:set ic			- Case-insensitive
:noh			- Suchwort Highlighting entfernen
%			- Zur dazugehörigen Klammer springen</pre></td></tr></table></div>

<p>Code Formatierung:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="" style="font-family:monospace;">gg=G			- Code einrücken
:!indent %		- Code schöner machen <span class="br0">&#40;</span>beautify<span class="br0">&#41;</span></pre></td></tr></table></div>

<p>Ich hoffe die Befehle helfen einigen von euch weiter <img src='http://johker.ibutho.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2010/11/13/programmieren-mit-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Side-by-Side Configuration</title>
		<link>http://johker.ibutho.de/2010/04/22/side-by-side-configuration/</link>
		<comments>http://johker.ibutho.de/2010/04/22/side-by-side-configuration/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 12:03:47 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fehler]]></category>
		<category><![CDATA[side-by-side]]></category>
		<category><![CDATA[vc++ redistributable]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=296</guid>
		<description><![CDATA[Falls mal jemand den gleichen Fehler wie ich hat unter Windows 7: http://www.windowsproblems.org/2010/01/04/side-by-side-configuration-error-in-windows-7/ Nummer 2-4 haben zum gewünschten Erfolg geführt. Nummer 1 war nicht anwendbar.]]></description>
			<content:encoded><![CDATA[<p>Falls mal jemand den gleichen Fehler wie ich hat unter Windows 7:<br />
<a href="http://www.windowsproblems.org/2010/01/04/side-by-side-configuration-error-in-windows-7/">http://www.windowsproblems.org/2010/01/04/side-by-side-configuration-error-in-windows-7/</a><br />
Nummer 2-4 haben zum gewünschten Erfolg geführt. Nummer 1 war nicht anwendbar.</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2010/04/22/side-by-side-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVI Dateien zusammenfügen</title>
		<link>http://johker.ibutho.de/2010/01/13/avi-dateien-zusammenfugen/</link>
		<comments>http://johker.ibutho.de/2010/01/13/avi-dateien-zusammenfugen/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 18:01:40 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[avimerge]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[transcode]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=281</guid>
		<description><![CDATA[Das funktioniert entweder mit mencoder: 1 mencoder -forceidx -ovc copy -oac copy -o output.avi input1.avi input2.avi ... Oder mit avimerge aus dem transcode package: 1 avimerge -o output.avi -i input1.avi input2.avi ...]]></description>
			<content:encoded><![CDATA[<p>Das funktioniert entweder mit <i>mencoder</i>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mencoder <span style="color: #660033;">-forceidx</span> <span style="color: #660033;">-ovc</span> copy <span style="color: #660033;">-oac</span> copy <span style="color: #660033;">-o</span> output.avi input1.avi input2.avi ...</pre></td></tr></table></div>

<p>Oder mit <i>avimerge</i> aus dem <i>transcode</i> package:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">avimerge <span style="color: #660033;">-o</span> output.avi <span style="color: #660033;">-i</span> input1.avi input2.avi ...</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2010/01/13/avi-dateien-zusammenfugen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Seite mit Passwort schützen</title>
		<link>http://johker.ibutho.de/2009/10/29/wordpress-seite-mit-passwort-schutzen/</link>
		<comments>http://johker.ibutho.de/2009/10/29/wordpress-seite-mit-passwort-schutzen/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 13:45:26 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[passwortschutz]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[protect]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=277</guid>
		<description><![CDATA[Lange habe ich nach dieser Funktion gesucht und nun habe ich sie endlich gefunden: Rechts neben der Textbox zum Verfassen eines Beitrags gibts es einen Bereich &#8220;Publish&#8221;. Dort kann man unter &#8220;Visibility&#8221; festlegen, ob eine Seite öffentlich, passwortgeschützt oder privat &#8230; <a href="http://johker.ibutho.de/2009/10/29/wordpress-seite-mit-passwort-schutzen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lange habe ich nach dieser Funktion gesucht und nun habe ich sie endlich gefunden:<br />
Rechts neben der Textbox zum Verfassen eines Beitrags gibts es einen Bereich &#8220;Publish&#8221;. Dort kann man unter &#8220;Visibility&#8221; festlegen, ob eine Seite öffentlich, passwortgeschützt oder privat sein soll.</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/10/29/wordpress-seite-mit-passwort-schutzen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Synergy</title>
		<link>http://johker.ibutho.de/2009/08/10/synergy/</link>
		<comments>http://johker.ibutho.de/2009/08/10/synergy/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 09:00:14 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=274</guid>
		<description><![CDATA[Ein geniales Tool, wenn man zwei Rechner hat und diese ohne teure Hardware mit der selben Maus/der selben Tastatur verwenden will. Zusätzlich steht auch noch eine gemeinsame Zwischenablage zur Verfügung. Unter folgendem Link wird sehr einfach erklärt, wie man Synergy &#8230; <a href="http://johker.ibutho.de/2009/08/10/synergy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ein geniales Tool, wenn man zwei Rechner hat und diese ohne teure Hardware mit der selben Maus/der selben Tastatur verwenden will. Zusätzlich steht auch noch eine gemeinsame Zwischenablage zur Verfügung.<br />
Unter folgendem Link wird sehr einfach erklärt, wie man <em>Synergy</em> einrichtet:<br />
<a href="http://gnuski.blogspot.com/2008/02/quicksynergy-quick-howto.html">http://gnuski.blogspot.com/2008/02/quicksynergy-quick-howto.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/08/10/synergy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Freien Speicherplatz auf ftp-Server bestimmen</title>
		<link>http://johker.ibutho.de/2009/08/03/freien-speicherplatz-auf-ftp-server-bestimmen/</link>
		<comments>http://johker.ibutho.de/2009/08/03/freien-speicherplatz-auf-ftp-server-bestimmen/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 09:07:33 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[du]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[lftp]]></category>
		<category><![CDATA[space usage]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=267</guid>
		<description><![CDATA[In Zusammenhang mit meinem letzten Beitrag über Server-Backups hier noch ein kleiner Tipp wie man den freien Speicherplatz auf einem ftp-Server bestimmen kann: 1 echo du -hs . &#124; lftp -u &#60;BENUTZERNAME&#62;,&#60;PASSWORT&#62; &#60;SERVER&#62; Sollte das Paket lftp nicht verfügbar sein, &#8230; <a href="http://johker.ibutho.de/2009/08/03/freien-speicherplatz-auf-ftp-server-bestimmen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In Zusammenhang mit meinem letzten Beitrag über Server-Backups hier noch ein kleiner Tipp wie man den freien Speicherplatz auf einem ftp-Server bestimmen kann:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">-hs</span> . <span style="color: #000000; font-weight: bold;">|</span> lftp <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&lt;</span>BENUTZERNAME<span style="color: #000000; font-weight: bold;">&gt;</span>,<span style="color: #000000; font-weight: bold;">&lt;</span>PASSWORT<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span>SERVER<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>Sollte das Paket <strong>lftp</strong> nicht verfügbar sein, kann man es über apt nachinstallieren:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> lftp</pre></td></tr></table></div>

<p>Falls jemand weiß, ob und wie man den freien Speicherplatz direkt über <em>ncftp</em> erfragen kann, wäre ich über einen kleinen Kommentar dankbar.</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/08/03/freien-speicherplatz-auf-ftp-server-bestimmen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Megavideo ohne Zeitbeschränkung</title>
		<link>http://johker.ibutho.de/2009/04/15/megavideo-ohne-zeitbeschrankung/</link>
		<comments>http://johker.ibutho.de/2009/04/15/megavideo-ohne-zeitbeschrankung/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 22:44:34 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[bypass time limit]]></category>
		<category><![CDATA[megavideo]]></category>
		<category><![CDATA[zeitbeschränkung umgehen]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/2009/04/15/megavideo-ohne-zeitbeschrankung/</guid>
		<description><![CDATA[Heute ist mir mal wieder ein Streich gelungen. Wer auch genervt ist von der 72 Minuten Beschränkung bei megavideo.com, für den habe ich die Lösung: Einfach auf folgender Webseite ganz rechts im &#8220;Megavideo Bypasser!!!&#8221; den Link zum megavideo-Video angeben und &#8230; <a href="http://johker.ibutho.de/2009/04/15/megavideo-ohne-zeitbeschrankung/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Heute ist mir mal wieder ein Streich gelungen. Wer auch genervt ist von der 72 Minuten Beschränkung bei megavideo.com, für den habe ich die Lösung: Einfach auf folgender Webseite ganz rechts im &#8220;Megavideo Bypasser!!!&#8221; den Link zum megavideo-Video angeben und ohne lästige Unterbrechung Filme schauen.</p>
<p><a href="http://www.atunn.com/index.html?atunn_language=English%20(USA)&#038;atunn_section=movies&#038;category=&#038;search_keyword=">LINK</a></p>
<p><strong>Update:</strong> Diese Methode funktioniert wohl nicht mehr. Alternativ kann man das Video in megavideo komplett vorladen lassen, dann in den Offline-Modus des Browsers wechseln, das Video anschauen und danach wieder in den Online-Modus wechseln. Auch mit dieser Methode sollte man ohne Zeitbegrenzung schauen können. Viel Spaß!</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/04/15/megavideo-ohne-zeitbeschrankung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fetchmail Integration in postfixadmin</title>
		<link>http://johker.ibutho.de/2009/04/07/fetchmail-integration-in-postfixadmin/</link>
		<comments>http://johker.ibutho.de/2009/04/07/fetchmail-integration-in-postfixadmin/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 21:26:34 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[fetchmail]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[konfiguration]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[postfixadmin]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=227</guid>
		<description><![CDATA[Viele Benutzer haben auch Mailboxen bei anderen Anbietern, z.B. bei gmx oder web.de. Damit diese Benutzer ihre E-Mails aggregieren können, wird fetchmail eingerichtet. fetchmail ist bereits in postfixadmin integriert, somit können fetchmail-Einträge über postfixadmin verwaltet werden (derzeit leider nur von &#8230; <a href="http://johker.ibutho.de/2009/04/07/fetchmail-integration-in-postfixadmin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Viele Benutzer haben auch Mailboxen bei anderen Anbietern, z.B. bei gmx oder web.de. Damit diese Benutzer ihre E-Mails aggregieren können, wird <em>fetchmail</em> eingerichtet. <em>fetchmail</em> ist bereits in <em>postfixadmin</em> integriert, somit können <em>fetchmail</em>-Einträge über <em>postfixadmin</em> verwaltet werden (derzeit leider nur von Administratoren). Über das mitgelieferte <em>fetchmail.pl</em>-Skript werden die Daten aus der Datenbank ausgelesen, <em>fetchmail</em> aufgerufen, die Mails durch <em>amavisd-new</em> überprüft und an die Mailboxen der Benutzer ausgeliefert. Das <em>perl</em>-Skript wurde etwas angepasst, damit es mit <em>postgres</em> interagieren kann. Des Weiteren wurden die Dateinamen etwas angepasst.</p>
<p>Installation:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> fetchmail
<span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> liblockfile-simple-perl</pre></div></div>

<p>Nötige Verzeichnisse für das Skript anlegen:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>fetchmail
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>fetchmail<span style="color: #000000; font-weight: bold;">/</span>fetchmail-all.lock</pre></div></div>

<p>Das Skript:</p>
<p><em>fetchmail.pl</em></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> DBI<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> MIME<span style="color: #339933;">::</span><span style="color: #006600;">Base64</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># use Data::Dumper;</span>
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Temp</span> <span style="color: #009966; font-style: italic;">qw/ mkstemp /</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Sys<span style="color: #339933;">::</span><span style="color: #006600;">Syslog</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># require liblockfile-simple-perl</span>
<span style="color: #000000; font-weight: bold;">use</span> LockFile<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>lock trylock unlock<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
openlog<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;fetchmail-all&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;pid&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;mail&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> log_and_die <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">my</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
  syslog<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;err&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">die</span> <span style="color: #0000ff;">$message</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># read options and arguments</span>
&nbsp;
<span style="color: #0000ff;">$configfile</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/etc/fetchmail/config&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">@ARGS1</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #000000; font-weight: bold;">ARGV</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span> <span style="color: #0000ff;">@ARGS1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^-/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^--config$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$configfile</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span> <span style="color: #0000ff;">@ARGS1</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># postgres settings</span>
<span style="color: #0000ff;">$database</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;postfix&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$hostname</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;127.0.0.1&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$user</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;postfix&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$password</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;XXXXXX&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$run_dir</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;/var/run/fetchmail&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># use specified config file</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>e <span style="color: #0000ff;">$configfile</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">do</span> <span style="color: #0000ff;">$configfile</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">$dsn</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;DBI:Pg:database=$database;host=$hostname&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$lock_file</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$run_dir</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">&quot;/fetchmail-all.lock&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$lockmgr</span> <span style="color: #339933;">=</span> LockFile<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">make</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>autoclean <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span>max <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$lockmgr</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">lock</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$lock_file</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> log_and_die <span style="color: #ff0000;">&quot;can't lock ${lock_file}&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#postgres connect</span>
<span style="color: #0000ff;">$dbh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-&gt;</span><span style="color: #006600;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$dsn</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$user</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$password</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> log_and_die <span style="color: #ff0000;">&quot;cannot connect the database&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$sql</span><span style="color: #339933;">=</span><span style="color: #cc0000; font-style: italic;">&lt;&lt;SQL;
SELECT id,mailbox,src_server,src_auth,src_user,src_password,src_folder,fetchall,keep,protocol,mda,extra_options,usessl 
FROM fetchmail
WHERE date_part('epoch',now())-date_part('epoch',date) &gt; poll_time*60
SQL</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">%config</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">map</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$id</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$mailbox</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$src_server</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$src_auth</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$src_user</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$src_password</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$src_folder</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$fetchall</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$keep</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$protocol</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$mda</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$extra_options</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$usessl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=@</span><span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span>
&nbsp;
  syslog<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;info&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;fetch ${src_user}@${src_server} for ${mailbox}&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;user '${src_user}' there with password '&quot;</span><span style="color: #339933;">.</span>decode_base64<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$src_password</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;'&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; folder '${src_folder}'&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$src_folder</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; mda &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$mda</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$mda</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#       $cmd.=&quot; mda \&quot;/usr/local/libexec/dovecot/deliver -m ${mailbox}\&quot;&quot;;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; is '${mailbox}' here&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; keep&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$keep</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; fetchall&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$fetchall</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; ssl&quot;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$usessl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #0000ff;">$cmd</span><span style="color: #339933;">.=</span><span style="color: #ff0000;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$extra_options</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$extra_options</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #0000ff;">$text</span><span style="color: #339933;">=</span><span style="color: #cc0000; font-style: italic;">&lt;&lt;TXT;
set postmaster &quot;postmaster&quot;
set nobouncemail
set no spambounce
set properties &quot;&quot;
set syslog
&nbsp;
poll ${src_server} with proto ${protocol}
        $cmd
&nbsp;
TXT</span>
&nbsp;
  <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$file_handler</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$filename</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> mkstemp<span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;/tmp/fetchmail-all-XXXXX&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> log_and_die <span style="color: #ff0000;">&quot;cannot open/create fetchmail temp file&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">print</span> <span style="color: #0000ff;">$file_handler</span> <span style="color: #0000ff;">$text</span><span style="color: #339933;">;</span>
  <span style="color: #000066;">close</span> <span style="color: #0000ff;">$file_handler</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #0000ff;">$ret</span><span style="color: #339933;">=</span><span style="color: #ff0000;">`/usr/bin/fetchmail -f $filename -i $run_dir/fetchmail.pid`</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066;">unlink</span> <span style="color: #0000ff;">$filename</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #0000ff;">$sql</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;UPDATE fetchmail SET returned_text=&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">quote</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ret</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;, date=now() WHERE id=&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$id</span><span style="color: #339933;">;</span>
  <span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">do</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">selectall_arrayref</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$lockmgr</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">unlock</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$lock_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
closelog<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Damit das Skript regelmäßig ausgeführt wird, legen wir einen Cronjob dafür an (als Benutzer <strong>root</strong>). In der hier gezeigten Konfiguration wird das Skript alle 5 Minuten ausgeführt.</p>
<p><em>crontab -e</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">5</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>PFAD<span style="color: #000000; font-weight: bold;">/</span>ZU<span style="color: #000000; font-weight: bold;">/</span>fetchmail.pl <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/04/07/fetchmail-integration-in-postfixadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox SSL-Zertifikate</title>
		<link>http://johker.ibutho.de/2009/03/23/firefox-ssl-zertifikate/</link>
		<comments>http://johker.ibutho.de/2009/03/23/firefox-ssl-zertifikate/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 19:32:14 +0000</pubDate>
		<dc:creator>johker</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Tipps und Tricks]]></category>
		<category><![CDATA[addon]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[self-signed]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[ssl warning]]></category>

		<guid isPermaLink="false">http://johker.ibutho.de/?p=161</guid>
		<description><![CDATA[Endlich habe ich eine Lösung für die nervtötenden Firefox-Warnungen über selbstsignierte SSL-Zertifikate gefunden: https://addons.mozilla.org/en-US/firefox/addon/10246. Wer es auch leid ist die Maus 2-17 Mal schubsen zu müssen, bis Firefox einem endlich den Zugriff auf eine Webseite erlaubt, dem lege ich dieses &#8230; <a href="http://johker.ibutho.de/2009/03/23/firefox-ssl-zertifikate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Endlich habe ich eine Lösung für die nervtötenden Firefox-Warnungen über selbstsignierte SSL-Zertifikate gefunden: <a href="https://addons.mozilla.org/en-US/firefox/addon/10246" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/10246</a>. Wer es auch leid ist die Maus 2-17 Mal schubsen zu müssen, bis Firefox einem endlich den Zugriff auf eine Webseite erlaubt, dem lege ich dieses Addon ans Herz.<br />
ACHTUNG: Man sollte es nur benutzen, wenn man weiß, was man tut. Man kann mit diesem Plugin (etwas) einfacher Opfer von Phishing-Attacken oder ähnliche Angriffen werden.</p>
]]></content:encoded>
			<wfw:commentRss>http://johker.ibutho.de/2009/03/23/firefox-ssl-zertifikate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

