<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://wiki.goatpr0n.de/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>GoatPr0n</title>
        <description></description>
        <link>http://wiki.goatpr0n.de/</link>
        <lastBuildDate>Thu, 29 Jul 2010 13:31:55 +0200</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>http://wiki.goatpr0n.de/lib/images/favicon.ico</url>
            <title>GoatPr0n</title>
            <link>http://wiki.goatpr0n.de/</link>
        </image>
        <item>
            <title>default_sidebar_left</title>
            <link>http://wiki.goatpr0n.de/default_sidebar_left?rev=1277047089</link>
            <description>&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/start&quot; class=&quot;wikilink1&quot; title=&quot;start&quot;&gt;Home&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog&quot; class=&quot;wikilink1&quot; title=&quot;blogspace:goatblog&quot;&gt;Blog&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://feeds.feedburner.com/GoatBl0g&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://feeds.feedburner.com/GoatBl0g&quot;  rel=&quot;nofollow&quot;&gt;Blog RSS&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/projects&quot; class=&quot;wikilink1&quot; title=&quot;projects&quot;&gt;Projects&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
            <author>Julian Knauer</author>
            <pubDate>Sun, 20 Jun 2010 17:18:09 +0200</pubDate>
        </item>
        <item>
            <title>default_sidebar_right</title>
            <link>http://wiki.goatpr0n.de/default_sidebar_right?rev=1277046895</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot;&gt;&lt;a name=&quot;development&quot; id=&quot;development&quot;&gt;Development&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://cgit.goatpr0n.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://cgit.goatpr0n.de&quot;  rel=&quot;nofollow&quot;&gt;GIT&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT1 SECTION &quot;Development&quot; [1-63] --&gt;
&lt;h1 class=&quot;sectionedit2&quot;&gt;&lt;a name=&quot;blogroll&quot; id=&quot;blogroll&quot;&gt;Blogroll&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.fooz.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.fooz.de&quot;  rel=&quot;nofollow&quot;&gt;www.fooz.de&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.chimeric.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.chimeric.de&quot;  rel=&quot;nofollow&quot;&gt;www.chimeric.de&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.fundump.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.fundump.de&quot;  rel=&quot;nofollow&quot;&gt;www.fundump.de&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://blog.foosel.net/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://blog.foosel.net/&quot;  rel=&quot;nofollow&quot;&gt;blog.foosel.net&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.splitbrain.org/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.splitbrain.org/&quot;  rel=&quot;nofollow&quot;&gt;www.splitbrain.org&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://demod.org/blog&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://demod.org/blog&quot;  rel=&quot;nofollow&quot;&gt;demod.org&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://blog.elmweb.de/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://blog.elmweb.de/&quot;  rel=&quot;nofollow&quot;&gt;blog.elmweb.de&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://www.the-device.net&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.the-device.net&quot;  rel=&quot;nofollow&quot;&gt;www.the-device.net&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT2 SECTION &quot;Blogroll&quot; [64-459] --&gt;
&lt;h1 class=&quot;sectionedit3&quot;&gt;&lt;a name=&quot;blogsphere&quot; id=&quot;blogsphere&quot;&gt;Blogsphere&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://planet.dokuwiki.org&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://planet.dokuwiki.org&quot;  rel=&quot;nofollow&quot;&gt;planet.dokuwiki.org&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT3 SECTION &quot;Blogsphere&quot; [460-] --&gt;</description>
            <author>Julian Knauer</author>
            <pubDate>Sun, 20 Jun 2010 17:14:55 +0200</pubDate>
        </item>
        <item>
            <title>top_navigation</title>
            <link>http://wiki.goatpr0n.de/top_navigation?rev=1277030604</link>
            <description>&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/start&quot; class=&quot;wikilink1&quot; title=&quot;start&quot;&gt;Home&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog&quot; class=&quot;wikilink1&quot; title=&quot;blogspace:goatblog&quot;&gt;Blog&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/projects&quot; class=&quot;wikilink1&quot; title=&quot;projects&quot;&gt;Projects&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/user/julian.knauer&quot; class=&quot;wikilink1&quot; title=&quot;user:julian.knauer&quot;&gt;Contact&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/imprint&quot; class=&quot;wikilink1&quot; title=&quot;imprint&quot;&gt;Imprint&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
            <author>Julian Knauer</author>
            <pubDate>Sun, 20 Jun 2010 12:43:24 +0200</pubDate>
        </item>
        <item>
            <title>start</title>
            <link>http://wiki.goatpr0n.de/start?rev=1277030073</link>
            <description>
&lt;h1 class=&quot;sectionedit4&quot;&gt;&lt;a name=&quot;welcometogoatpr0nde&quot; id=&quot;welcometogoatpr0nde&quot;&gt;Welcome to GoatPr0n.de&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;em&gt;“If you don&amp;#039;t know goatse, you don&amp;#039;t have internet…”&lt;/em&gt;
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT4 SECTION &quot;Welcome to GoatPr0n.de&quot; [1-97] --&gt;
&lt;h2 class=&quot;sectionedit5&quot;&gt;&lt;a name=&quot;quicklinks&quot; id=&quot;quicklinks&quot;&gt;Quick links&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Site: &lt;a href=&quot;http://wiki.goatpr0n.de/blog&quot; class=&quot;wikilink1&quot; title=&quot;blog&quot;&gt;blog&lt;/a&gt; - my weblog&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Site: &lt;a href=&quot;http://cgit.goatpr0n.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://cgit.goatpr0n.de&quot;  rel=&quot;nofollow&quot;&gt;http://cgit.goatpr0n.de&lt;/a&gt; - git repository&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Project: &lt;a href=&quot;http://wiki.goatpr0n.de/projects/khtmld&quot; class=&quot;wikilink1&quot; title=&quot;projects:khtmld&quot;&gt;khtmld&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Project: &lt;a href=&quot;http://wiki.goatpr0n.de/projects/pidgin2imap&quot; class=&quot;wikilink1&quot; title=&quot;projects:pidgin2imap&quot;&gt;pidgin2imap&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;!-- EDIT5 SECTION &quot;Quick links&quot; [98-279] --&gt;
&lt;h2 class=&quot;sectionedit6&quot;&gt;&lt;a name=&quot;goatsefication&quot; id=&quot;goatsefication&quot;&gt;Goatsefication&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; Nothing so far&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;/div&gt;
&lt;!-- EDIT6 SECTION &quot;Goatsefication&quot; [280-] --&gt;</description>
            <author>Julian Knauer</author>
            <pubDate>Sun, 20 Jun 2010 12:34:33 +0200</pubDate>
        </item>
        <item>
            <title>blogspace:goatblog</title>
            <link>http://wiki.goatpr0n.de/blogspace/goatblog?rev=1276018036</link>
            <description>&lt;div class=&quot;blogtng_list&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;fixingmybrokenmonitor&quot; id=&quot;fixingmybrokenmonitor&quot; href=&quot;/blog/2010/06/02.fixing.my.broken.monitor&quot;&gt;Fixing my broken monitor&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Two month ago my old monitor, a Samsung SyncMaster 930BF broke. It is quite old, but I really got used to work with two monitors. At first it took some time before the monitor displayed something after turning it on, or it switched between modes and the green power LED blinked rapidly. After some more days the display stayed black. Id did some research on the internet and found an &lt;a href=&quot;http://www.tomshardware.co.uk/forum/247964-15-viewsonic-vx922-monitor-black-screen-green-power-light-flashes&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.tomshardware.co.uk/forum/247964-15-viewsonic-vx922-monitor-black-screen-green-power-light-flashes&quot;  rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; describing my problem. If it was true, I may be able to fix that.
Today I decided to loosen the screws of the old monitor an look for a bloated capacitor&lt;sup&gt;&lt;a href=&quot;#fn__blog_2010_06_02.fixing.my.broken.monitor__1&quot; name=&quot;fnt__blog_2010_06_02.fixing.my.broken.monitor__1&quot; id=&quot;fnt__blog_2010_06_02.fixing.my.broken.monitor__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 class=&quot;sectionedit7&quot;&gt;&lt;a name=&quot;astoryofsuccess&quot; id=&quot;astoryofsuccess&quot;&gt;A story of success&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
As the headline assumes, I&amp;#039;ve been successful! But I&amp;#039;ve docuemented some of my actions using photos and those I won&amp;#039;t keep back.
&lt;/p&gt;

&lt;p&gt;
Looking a the first picture, you&amp;#039;ll see the bloated capacitor, after locating the pins on the back, I had to remove it. I&amp;#039;ve used my soldering iron a used a temperatur around 400°C. The solder on factory soldered circuits can be really tough. To “absorb” the solder I am using a vaccuum pump.
&lt;/p&gt;

&lt;p&gt;
Luckily I had some replacement for the the old capacitor. They used a 1000µF-16v capacitor and so I started to re-solder the replacement. In the final step I cut the legs of the newly installed capacitor and reassembled the monitor, to test it.
&lt;/p&gt;

&lt;p&gt;
I had to re-open it three times, before I got some results, because I&amp;#039;ve forgotten to reconnect all cables! So check twice, if everything is properly connected and in place.
&lt;/p&gt;

&lt;p&gt;
The last picture shows the result of my work! The display is working again and turned on without any delay!
&lt;/p&gt;
&lt;table class=&quot;gallery gallery_center&quot; align=&quot;center&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/001_bad_guy.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;001_bad_guy.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/001_bad_guy.png?w=120&amp;amp;h=76&quot; width=&quot;120&quot; height=&quot;76&quot; border=&quot;0&quot; alt=&quot;001_bad_guy.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/002_removing.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;002_removing.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/002_removing.png?w=120&amp;amp;h=98&quot; width=&quot;120&quot; height=&quot;98&quot; border=&quot;0&quot; alt=&quot;002_removing.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/003_removing.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;003_removing.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/003_removing.png?w=101&amp;amp;h=120&quot; width=&quot;101&quot; height=&quot;120&quot; border=&quot;0&quot; alt=&quot;003_removing.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/004_replacement.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;004_replacement.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/004_replacement.png?w=63&amp;amp;h=119&quot; width=&quot;63&quot; height=&quot;119&quot; border=&quot;0&quot; alt=&quot;004_replacement.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/005_cut.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;005_cut.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/005_cut.png?w=118&amp;amp;h=120&quot; width=&quot;118&quot; height=&quot;120&quot; border=&quot;0&quot; alt=&quot;005_cut.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/006_success.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;006_success.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/006_success.png?w=120&amp;amp;h=95&quot; width=&quot;120&quot; height=&quot;95&quot; border=&quot;0&quot; alt=&quot;006_success.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;h2 class=&quot;sectionedit8&quot;&gt;&lt;a name=&quot;awordofcaution&quot; id=&quot;awordofcaution&quot;&gt;A word of caution&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Here is a warning to everyone who wants to try this, too. You are working with “high voltages”&lt;sup&gt;&lt;a href=&quot;#fn__blog_2010_06_02.fixing.my.broken.monitor__2&quot; name=&quot;fnt__blog_2010_06_02.fixing.my.broken.monitor__2&quot; id=&quot;fnt__blog_2010_06_02.fixing.my.broken.monitor__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt;. Capacitors can hold voltages over a long duration!
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;UPDATE #1:&lt;/strong&gt; &lt;em&gt;You should discharge the capacitor before measure it, otherwise it could harm your multimeter and/or your health! You can read the following article about capacitors, to be sure you won&amp;#039;t do anything wrong: &lt;a href=&quot;http://www.repairfaq.org/sam/captest.htm&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.repairfaq.org/sam/captest.htm&quot;  rel=&quot;nofollow&quot;&gt;http://www.repairfaq.org/sam/captest.htm&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;

&lt;p&gt;
Also there is now guarantee, that this is working for &lt;em class=&quot;u&quot;&gt;your&lt;/em&gt; broken monitor. It also voids the warranty of your device! I only tried to fix it my self, because the monitor is far beyond any warranty claim!
&lt;/p&gt;

&lt;p&gt;
You have been warned, I am not responsible for your mistakes!
&lt;/p&gt;

&lt;/div&gt;
&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__blog_2010_06_02.fixing.my.broken.monitor__1&quot; name=&quot;fn__blog_2010_06_02.fixing.my.broken.monitor__1&quot; id=&quot;fn__blog_2010_06_02.fixing.my.broken.monitor__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Capacitor_plague&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://en.wikipedia.org/wiki/Capacitor_plague&quot;  rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Capacitor_plague&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__blog_2010_06_02.fixing.my.broken.monitor__2&quot; name=&quot;fn__blog_2010_06_02.fixing.my.broken.monitor__2&quot; id=&quot;fn__blog_2010_06_02.fixing.my.broken.monitor__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
for a computer scientist they are fairly high&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_footer level1&quot;&gt;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/06/02.fixing.my.broken.monitor&quot; class=&quot;wikilink1 blogtng_permalink&quot;&gt;Fixing my broken monitor&lt;/a&gt;
    &amp;middot;
    2010-06-02 13:57    &amp;middot;
    Julian Knauer    &amp;middot;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/06/02.fixing.my.broken.monitor#the__comments&quot; class=&quot;wikilink1 blogtng_commentlink&quot;&gt;1 Comment&lt;/a&gt;
    &amp;middot;
    Tags: &lt;ul class=&quot;blogtng_tags&quot;&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=blog&quot; class=&quot;tag&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=fix&quot; class=&quot;tag&quot;&gt;fix&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=hack&quot; class=&quot;tag&quot;&gt;hack&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=monitor&quot; class=&quot;tag&quot;&gt;monitor&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=repair&quot; class=&quot;tag&quot;&gt;repair&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_list&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;quicksolutionforspamreportsonyourmailserver&quot; id=&quot;quicksolutionforspamreportsonyourmailserver&quot; href=&quot;/blog/2010/03/24.quick.solution.for.spam.reports.on.your.mailserver&quot;&gt;Quick solution for SPAM reports on your mailserver&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Recently I have been faced with the problem, that I haven&amp;#039;t read all mails
send to me. My sieve-rules are set to mark all SPAM as &lt;em&gt;read&lt;/em&gt; if the score
is above a certain &lt;em&gt;X-Spam-Score&lt;/em&gt; level. It is a practial solution to get
them out of your sight, and keep the new mail notifications of my mail reader
low.
I don&amp;#039;t go through every SPAM mail I receive, so it happened that I&amp;#039;ve missed
a view mails really ment for me. One solution, which I&amp;#039;ve implemented, is to
parse all mail located in the SPAM folders and generate a report and send it
as mail every 24h.
&lt;/p&gt;

&lt;p&gt;
The following scripts are ment to be used on mailboxes using &lt;em&gt;maildir&lt;/em&gt;
format. Please note, both scripts are quick-hacks and not optimized. If you
have any recommandation for improvements, do not hesitate to leave a comment
or send me an email.
&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;spamgathering&quot; id=&quot;spamgathering&quot;&gt;Spam gathering&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;

&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;#!/usr/bin/env python&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;shelve&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;datetime&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;
&amp;nbsp;
VERSION = &lt;span class=&quot;st0&quot;&gt;'0.0.2'&lt;/span&gt;
CHECKDIR = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'cur'&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;'new'&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;'tmp'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
count_spam = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; scan_maildir&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;arg, dirname, names&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;global&lt;/span&gt; count_spam
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; dirname&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dirname&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;:&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; CHECKDIR &lt;span class=&quot;kw1&quot;&gt;and&lt;/span&gt; dirname.&lt;span class=&quot;me1&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'.Junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;= &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; names:
            filename = &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;dirname, &lt;span class=&quot;kw2&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            fp = &lt;span class=&quot;kw2&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;filename, &lt;span class=&quot;st0&quot;&gt;'r'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; fp:
                msg = &lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;message_from_file&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;fp&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                fp.&lt;span class=&quot;me1&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                &lt;span class=&quot;co1&quot;&gt;#for k in msg.keys():&lt;/span&gt;
                &lt;span class=&quot;co1&quot;&gt;#    print '&amp;gt;&amp;gt;&amp;gt;', k, msg.get(k)&lt;/span&gt;
                &lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt; = msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Message-id'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
                &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; db_junk.&lt;span class=&quot;me1&quot;&gt;keys&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
                    db_junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Date'&lt;/span&gt;: msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'From'&lt;/span&gt;: msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'From'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'To'&lt;/span&gt;: msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'To'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'Subject'&lt;/span&gt;: msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Subject'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'Score'&lt;/span&gt;: msg.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'X-Spam-Score'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'filename'&lt;/span&gt;: filename,
                                   &lt;span class=&quot;st0&quot;&gt;'lastseen'&lt;/span&gt;: &lt;span class=&quot;kw2&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;datetime&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;today&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                   &lt;span class=&quot;st0&quot;&gt;'reported'&lt;/span&gt;: &lt;span class=&quot;kw2&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
                    count_spam += &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;:
    maildir = &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
    db = &lt;span class=&quot;kw3&quot;&gt;shelve&lt;/span&gt;.&lt;span class=&quot;kw2&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;maildir, &lt;span class=&quot;st0&quot;&gt;'junkmail.db'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;'c'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'version'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= VERSION:
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Database version missmatch!'&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'  Database:'&lt;/span&gt;, db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'version'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'  Script  :'&lt;/span&gt;, VERSION
            &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Aborted.'&lt;/span&gt;
            &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;KeyError&lt;/span&gt;:
        &lt;span class=&quot;co1&quot;&gt;#print 'Initializing database version', VERSION&lt;/span&gt;
        db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'version'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = VERSION
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        db_junk = db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;KeyError&lt;/span&gt;:
        db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        db_junk = db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;walk&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;maildir, scan_maildir, &lt;span class=&quot;kw2&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = db_junk &lt;span class=&quot;co1&quot;&gt;# write changes to shelve&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Not enough parameters. Specify path to scan.'&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
db.&lt;span class=&quot;me1&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;# Example script invocation:&lt;/span&gt;
$ .&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;spamsum.py ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Maildir&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
The script above only takes the directory to parse as parameter. This
directory is used as root where it stores all information about SPAM in a file
called &lt;em&gt;junkmail.db&lt;/em&gt;.
I haven&amp;#039;t implemented anything to purge the database, if mails are deleted.
&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;reportgeneration&quot; id=&quot;reportgeneration&quot;&gt;Report generation&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;#!/usr/bin/env python&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;shelve&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;datetime&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;smtplib&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;mime&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; MIMEText
&amp;nbsp;
VERSION = &lt;span class=&quot;st0&quot;&gt;'0.0.2'&lt;/span&gt;
SENDERMAIL = &lt;span class=&quot;st0&quot;&gt;'spamreport@localhost'&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Not enough parameters. Specify path to scan.'&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Usage:&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\t&lt;/span&gt;%s &amp;lt;maildir&amp;gt; &amp;lt;email&amp;gt;'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
maildir = &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
db = &lt;span class=&quot;kw3&quot;&gt;shelve&lt;/span&gt;.&lt;span class=&quot;kw2&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;maildir, &lt;span class=&quot;st0&quot;&gt;'junkmail.db'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;'w'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'version'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;= VERSION:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Database version missmatch!'&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'  Database:'&lt;/span&gt;, db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'version'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'  Script  :'&lt;/span&gt;, VERSION
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Aborted.'&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Database is empty.'&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
    db_junk = db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Database is empty.'&lt;/span&gt;
    &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
sep_line = &lt;span class=&quot;st0&quot;&gt;'='&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;78&lt;/span&gt;
&amp;nbsp;
spam_count = &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
line = &lt;span class=&quot;st0&quot;&gt;'Summary of unreported SPAM mails:&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;%s'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; sep_line
senders = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
text = &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;line&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; db_junk:
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;not&lt;/span&gt; db_junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'reported'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;:
        junk = db_junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
        &lt;span class=&quot;co1&quot;&gt;#print id, db_junk[id]&lt;/span&gt;
        line = &lt;span class=&quot;st0&quot;&gt;'   [ ] From: %s --&amp;gt; To: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\&lt;/span&gt;
      Subject: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\&lt;/span&gt;
      Date: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\&lt;/span&gt;
      Spam-Score: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'From'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'To'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Subject'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,
                           junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Score'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
        text.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;line&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        senders.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'From'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Date'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Score'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        junk&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'reported'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;
        spam_count += &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;
db&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'junk'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = db_junk &lt;span class=&quot;co1&quot;&gt;# sync changes&lt;/span&gt;
db.&lt;span class=&quot;me1&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
text.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
text.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Summary of unreported SPAM sender addresses:&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;%s'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; sep_line&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; sender &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; senders:
    line = &lt;span class=&quot;st0&quot;&gt;'   [ ] From: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\&lt;/span&gt;
       Date: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;es0&quot;&gt;\&lt;/span&gt;
       Score: %s&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;sender&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, sender&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, sender&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    text.&lt;span class=&quot;me1&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;line&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
msg = MIMEText&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;text&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
msg&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Subject'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;'%d reported Mails by GoatPr0n SPAM Report'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; spam_count
msg&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'From'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = SENDERMAIL
msg&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'To'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; spam_count &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;:
    s = &lt;span class=&quot;kw3&quot;&gt;smtplib&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SMTP&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'localhost:10025'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;# bypass spamassassin&lt;/span&gt;
    s.&lt;span class=&quot;me1&quot;&gt;sendmail&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;SENDERMAIL, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, msg.&lt;span class=&quot;me1&quot;&gt;as_string&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    s.&lt;span class=&quot;me1&quot;&gt;quit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;# Example script invocation:&lt;/span&gt;
$ .&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;spamreport.py ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;Maildir admin&lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;localhost&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
This script needs to be run with two parameters. The first one is the root
directory where &lt;em&gt;junkmail.db&lt;/em&gt; is located and the second one is the email
address the genereted report is sent to.
&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;cronjob&quot; id=&quot;cronjob&quot;&gt;Cron job&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;co0&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-e&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;re2&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;bin:&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;usr&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;local&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;sbin
&lt;span class=&quot;re2&quot;&gt;MAILDIRS&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;path&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;to&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;maildirs
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; maildirs &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$MAILDIRS&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; maildir &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$maildirs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/*&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;do&lt;/span&gt;
        &lt;span class=&quot;re2&quot;&gt;email&lt;/span&gt;=&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$maildir&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;
&amp;nbsp;
        spamsum.py &lt;span class=&quot;re1&quot;&gt;$maildir&lt;/span&gt;
        spamreport.py &lt;span class=&quot;re1&quot;&gt;$maildir&lt;/span&gt; &lt;span class=&quot;re1&quot;&gt;$email&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;done&lt;/span&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
I have placed it in &lt;em&gt;/etc/cron.daily&lt;/em&gt;.
&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;theresultingreport&quot; id=&quot;theresultingreport&quot;&gt;The resulting report&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;pre class=&quot;code&quot;&gt;
Return-Transfer-Encoding: 7bit
Subject: 1 reported Mails by GoatPr0n SPAM Report
From: spamreport@localhost
To: admin@localhost

Summary of unreported SPAM mails:
==============================================================================
   [ ] From: &amp;quot;Drugstore #1&amp;quot; &amp;lt;root@localhost&amp;gt; --&amp;gt; To: admin@localhost
      Subject: *****SPAM***** Welcome, admin. Everything on -80% today
      Date: Tue, 23 Mar 2010 21:56:44 -0500
      Spam-Score: 10.5



Summary of unreported SPAM sender addresses:
==============================================================================
   [ ] From: &amp;quot;Drugstore #1&amp;quot; &amp;lt;root@localhost&amp;gt;
       Date: Tue, 23 Mar 2010 21:56:44 -0500
       Score: 10.5
&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
The email addresses in these samples have been altered, so hopefully email
crawlers use them to send the spam to their selfs…
&lt;/p&gt;

&lt;/div&gt;
&lt;div class=&quot;blogtng_footer level1&quot;&gt;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/03/24.quick.solution.for.spam.reports.on.your.mailserver&quot; class=&quot;wikilink1 blogtng_permalink&quot;&gt;Quick solution for SPAM reports on your mailserver&lt;/a&gt;
    &amp;middot;
    2010-03-24 14:53    &amp;middot;
    Julian Knauer    &amp;middot;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/03/24.quick.solution.for.spam.reports.on.your.mailserver#the__comments&quot; class=&quot;wikilink1 blogtng_commentlink&quot;&gt;0 Comments&lt;/a&gt;
    &amp;middot;
    Tags: &lt;ul class=&quot;blogtng_tags&quot;&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=blog&quot; class=&quot;tag&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=python&quot; class=&quot;tag&quot;&gt;python&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=spam&quot; class=&quot;tag&quot;&gt;spam&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_list&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;wallpapermanagementpt1&quot; id=&quot;wallpapermanagementpt1&quot; href=&quot;/blog/2010/03/22.wallpaper.management.pt.1&quot;&gt;Wallpaper management pt.1&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

I really like wallpapers (especially those with babes &lt;img src=&quot;http://wiki.goatpr0n.de/lib/images/smileys/icon_fun.gif&quot; class=&quot;middle&quot; alt=&quot;^_^&quot; /&gt;), and I always try to get as many as I can. I also wrote a script to download the wallpapers from &lt;a href=&quot;http://www.skins.be&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.skins.be&quot;  rel=&quot;nofollow&quot;&gt;skins.be&lt;/a&gt;. To avoid lots of traffic to this website I won&amp;#039;t publish the script here - but it is awesome!
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;$ find wallpapers_skins.be -type f | wc -l
35640&lt;/pre&gt;

&lt;p&gt;
This is the result after running it to fetch all images with a resolution of 1920&amp;times;1200 and 1280&amp;times;1024 and I also downloaded other websites… Okay, let&amp;#039;s just say I&amp;#039;ve got a lot of wallpapers. The problem you&amp;#039;ll face is, which wallpaper you should use. My window manager is Xfce4 and it supports image-lists to pick a random background image on login. To pick a random wallpaper during your session you can force Xfce4 to switch to a &lt;em&gt;none&lt;/em&gt;-wallpaper and immediately back to you image-list. I wrote a little tool, placing it self in your system tray, to do it. An old description of the project can be found &lt;a href=&quot;http://wiki.goatpr0n.de/projects/pyxfwpchange&quot; class=&quot;wikilink1&quot; title=&quot;projects:pyxfwpchange&quot;&gt;here&lt;/a&gt;, but I recently rewrote the whole application but I haven&amp;#039;t had time to write the project page for it. The behavior is pretty much the same but the code is much more organized. To download the project you can go to &lt;a href=&quot;http://git.goatpr0n.de/Xfwpc/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://git.goatpr0n.de/Xfwpc/&quot;  rel=&quot;nofollow&quot;&gt;http://git.goatpr0n.de/Xfwpc/&lt;/a&gt; and download it from there.
&lt;/p&gt;

&lt;p&gt;
Xfwpc has some features which you might find interesting:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; image-lists based on wireless networks&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; multi-desktop support&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; on-the-fly update timer changing&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; on-demand wallpaper changing&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

After advertising my Xfwpc project a little bit, I&amp;#039;ll come to the main
reason why I started writing this blog entry - I always start without
plan. Just typing and typing and typing, blah blah blah, errr back to
the text.
&lt;/p&gt;

&lt;p&gt;
In order to manage the flood of wallpapers I&amp;#039;ve collected, I wrote
scripts to automaticly add the images to the correct image-list of a
monitor based on its resolution ratio. Today I&amp;#039;ve wrote a script to use
from within feh. &lt;a href=&quot;http://linuxbrit.co.uk/software/feh/&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://linuxbrit.co.uk/software/feh/&quot;  rel=&quot;nofollow&quot;&gt;feh&lt;/a&gt; is a very
cool image viewer with some nice features. What I did, was to define two
actions to add a wallpaper to monitor 1 or 2.
&lt;/p&gt;

&lt;p&gt;
So let&amp;#039;s have a look at the script first.
&lt;pre class=&quot;code python&quot;&gt;&lt;span class=&quot;co1&quot;&gt;#!/usr/bin/env python&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;, &lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; gtk, pynotify
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; Image
&lt;span class=&quot;kw1&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;kw3&quot;&gt;subprocess&lt;/span&gt;
&amp;nbsp;
screen = gtk.&lt;span class=&quot;me1&quot;&gt;gdk&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Screen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; add_to_list&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image, monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw3&quot;&gt;cmd&lt;/span&gt; = &lt;span class=&quot;st0&quot;&gt;'xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor%s/last-image-list'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; monitor
    pipe = &lt;span class=&quot;kw3&quot;&gt;subprocess&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Popen&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;cmd&lt;/span&gt;, shell=&lt;span class=&quot;kw2&quot;&gt;True&lt;/span&gt;, bufsize=&lt;span class=&quot;nu0&quot;&gt;128&lt;/span&gt;,
                            stdout=&lt;span class=&quot;kw3&quot;&gt;subprocess&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;PIPE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;stdout&lt;/span&gt;
    listpath = pipe.&lt;span class=&quot;kw3&quot;&gt;readline&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rstrip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; listpath
    fd_list = &lt;span class=&quot;kw2&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;listpath, &lt;span class=&quot;st0&quot;&gt;'a'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; fd_list:
        fd_list.&lt;span class=&quot;me1&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;os&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;expanduser&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span class=&quot;st0&quot;&gt;'&lt;span class=&quot;es0&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        fd_list.&lt;span class=&quot;me1&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n = pynotify.&lt;span class=&quot;me1&quot;&gt;Notification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Wallpaper added.'&lt;/span&gt;,
                                  &lt;span class=&quot;st0&quot;&gt;'Successfully added %s.'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; image,
                                  &lt;span class=&quot;st0&quot;&gt;'dialog-ok'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;set_urgency&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pynotify.&lt;span class=&quot;me1&quot;&gt;URGENCY_NORMAL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;set_timeout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; get_ImageRatio&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    &lt;span class=&quot;kw1&quot;&gt;try&lt;/span&gt;:
        img = Image.&lt;span class=&quot;kw2&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;except&lt;/span&gt;:
        n = pynotify.&lt;span class=&quot;me1&quot;&gt;Notification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Image error'&lt;/span&gt;,
                                  &lt;span class=&quot;st0&quot;&gt;'Failed to load %s'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; image,
                                  &lt;span class=&quot;st0&quot;&gt;'dialog-no'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;set_urgency&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pynotify.&lt;span class=&quot;me1&quot;&gt;URGENCY_CRITICAL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;set_timeout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        n.&lt;span class=&quot;me1&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Image error'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    w, h = img.&lt;span class=&quot;me1&quot;&gt;size&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;del&lt;/span&gt; img
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; w / h
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; get_MonitorRatio&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    geometry = screen.&lt;span class=&quot;me1&quot;&gt;get_monitor_geometry&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    ratio = &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;*&lt;/span&gt; geometry.&lt;span class=&quot;me1&quot;&gt;width&lt;/span&gt; / geometry.&lt;span class=&quot;me1&quot;&gt;height&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; ratio
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;def&lt;/span&gt; main&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;argv&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;:
    pynotify.&lt;span class=&quot;me1&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Wallpaper adder'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;argv&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;:
        &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;'Not enough parameter. Need monitor name and at least one image.'&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    monitor = argv&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
    images = argv&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;:&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;
&amp;nbsp;
    &lt;span class=&quot;kw1&quot;&gt;for&lt;/span&gt; image &lt;span class=&quot;kw1&quot;&gt;in&lt;/span&gt; images:
        iRatio = get_ImageRatio&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        mRatio = get_MonitorRatio&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; iRatio == mRatio:
            add_to_list&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image, monitor&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
        &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;:
            n = pynotify.&lt;span class=&quot;me1&quot;&gt;Notification&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'Wallpaper resolution error'&lt;/span&gt;,
                                      &lt;span class=&quot;st0&quot;&gt;'Skipping %s. Wrong ratio: %4.3f:%4.3f'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;image, iRatio, mRatio&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;,
                                      &lt;span class=&quot;st0&quot;&gt;'dialog-no'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            n.&lt;span class=&quot;me1&quot;&gt;set_urgency&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;pynotify.&lt;span class=&quot;me1&quot;&gt;URGENCY_CRITICAL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            n.&lt;span class=&quot;me1&quot;&gt;set_timeout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
            n.&lt;span class=&quot;me1&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; __name__ == &lt;span class=&quot;st0&quot;&gt;'__main__'&lt;/span&gt;:
    main&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;sys&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
The script checks if the image fits the screen ratio of the current
resolution and then adds it to the image-list of the given screen. The
path to the list is determained by invoking &lt;em&gt;xfconf-query&lt;/em&gt;.
&lt;/p&gt;

&lt;p&gt;
To use the script with feh, I have added the following alias to my shell
configuration
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;alias feh=&amp;quot;feh --action1 &amp;#039;${HOME}/bin/wallpaper_add2Monitor 0 \&amp;quot;%f\&amp;quot;&amp;#039; --action2 &amp;#039;${HOME}/bin/wallpaper_add2Monitor 1 \&amp;quot;%f\&amp;quot;&amp;#039;&amp;quot;&lt;/pre&gt;

&lt;p&gt;

If I run feh and press &lt;kbd&gt;1&lt;/kbd&gt; or &lt;kbd&gt;2&lt;/kbd&gt;. We will run the
script to add it to the image-list.
&lt;/p&gt;

&lt;p&gt;
I haven&amp;#039;t re-read this entry (&lt;em&gt;tl;dr&lt;/em&gt;), but I hope you&amp;#039;ve got what I
was trying to say and give some feedback, but not on the crappy writing style &lt;img src=&quot;http://wiki.goatpr0n.de/lib/images/smileys/icon_wink.gif&quot; class=&quot;middle&quot; alt=&quot;;-)&quot; /&gt; Thank you!
&lt;/p&gt;

&lt;/div&gt;
&lt;div class=&quot;blogtng_footer level1&quot;&gt;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/03/22.wallpaper.management.pt.1&quot; class=&quot;wikilink1 blogtng_permalink&quot;&gt;Wallpaper management pt.1&lt;/a&gt;
    &amp;middot;
    2010-03-22 22:36    &amp;middot;
    Julian Knauer    &amp;middot;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2010/03/22.wallpaper.management.pt.1#the__comments&quot; class=&quot;wikilink1 blogtng_commentlink&quot;&gt;0 Comments&lt;/a&gt;
    &amp;middot;
    Tags: &lt;ul class=&quot;blogtng_tags&quot;&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=blog&quot; class=&quot;tag&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=feh&quot; class=&quot;tag&quot;&gt;feh&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=python&quot; class=&quot;tag&quot;&gt;python&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_list&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;paganfest2009&quot; id=&quot;paganfest2009&quot; href=&quot;/blog/2009/09/18.paganfest.2009&quot;&gt;paganfest 2009&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

I have just returned from &lt;a href=&quot;http://www2.paganfest.eu/index2.php&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/index2.php&quot;  rel=&quot;nofollow&quot;&gt;Paganfest&lt;/a&gt; in
Frankfurt &lt;a href=&quot;http://www.batschkapp.de&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.batschkapp.de&quot;  rel=&quot;nofollow&quot;&gt;Batschkapp&lt;/a&gt;. Wow, what a great event.
Okay, I am a bit early home again, but beeing there since 5 pm and banging and
moshing the whole time can be really exhausting.
&lt;/p&gt;

&lt;p&gt;
The first band was &lt;a href=&quot;http://www.swashbuckle.info&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.swashbuckle.info&quot;  rel=&quot;nofollow&quot;&gt;Swashbuckle&lt;/a&gt;, &lt;em&gt;they dress like
pirates and play death-metal&lt;/em&gt;. I liked his fluffy toy parrot on the shoulder of
the lead singer. The next band was
&lt;a href=&quot;http://www2.paganfest.eu/bands/exdeo.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/bands/exdeo.html&quot;  rel=&quot;nofollow&quot;&gt;Ex Deo&lt;/a&gt;. It was the first time I&amp;#039;ve
listened to their music. They are playing great death-metal. They take the
inspiration for their lyrics from the old rome.
&lt;/p&gt;

&lt;p&gt;
But one absolute party overkill act has been
&lt;a href=&quot;http://www2.paganfest.eu/bands/alestorm.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/bands/alestorm.html&quot;  rel=&quot;nofollow&quot;&gt;Alestorm&lt;/a&gt;. They play absolute
f*cking genius &lt;em&gt;pirate-metal&lt;/em&gt;&lt;sup&gt;&lt;a href=&quot;#fn__blog_2009_09_18.paganfest.2009__1&quot; name=&quot;fnt__blog_2009_09_18.paganfest.2009__1&quot; id=&quot;fnt__blog_2009_09_18.paganfest.2009__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;. Just everyone
was banging and singing to their songs! Absolutly a must-have in every metal
collection.&lt;sup&gt;&lt;a href=&quot;#fn__blog_2009_09_18.paganfest.2009__2&quot; name=&quot;fnt__blog_2009_09_18.paganfest.2009__2&quot; id=&quot;fnt__blog_2009_09_18.paganfest.2009__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; The
fourth band was &lt;a href=&quot;http://www2.paganfest.eu/bands/unleashed.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/bands/unleashed.html&quot;  rel=&quot;nofollow&quot;&gt;Unleashed&lt;/a&gt;, but
I took a little timeout, so I haven&amp;#039;t seen the whole act. They were okay. Not
really one of my favorites, but quite okay.
&lt;/p&gt;

&lt;p&gt;
The next ultimate act on this evening was
&lt;a href=&quot;http://www2.paganfest.eu/bands/reitermania.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/bands/reitermania.html&quot;  rel=&quot;nofollow&quot;&gt;Die Apokalyptischen Reiter&lt;/a&gt;,
I&amp;#039;ve never saw them live before, despite the fact that they are one of my
favorite bands. It was fantastic. There was a wall-of-death, I almost lost my shoe during
that. Alestorm tried to make a wall-of-death, too, but I think there where to
many little kids, which cannot count to three and wait for the &lt;em&gt;“Go!”&lt;/em&gt;. So
their wall-of-death perished within a simple &lt;em&gt;“Pogo-session”&lt;/em&gt;. Back to the
&lt;em&gt;Reiter&lt;/em&gt;. It was just brilliant, how the lead singer transfered his energy and
enthusiasm to the masses at the moshpit. Brilliant!
&lt;/p&gt;

&lt;p&gt;
The last one this evening were
&lt;a href=&quot;http://www2.paganfest.eu/bands/korpiklaani.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www2.paganfest.eu/bands/korpiklaani.html&quot;  rel=&quot;nofollow&quot;&gt;Korpiklaani&lt;/a&gt;, which is also
nice music to party. The first thing which attracts attention is the bottle of
Vodka he trinks during the gig.
&lt;/p&gt;

&lt;p&gt;
Okay, I call it for the day. I am tired. Good bye!
&lt;/p&gt;



&lt;/div&gt;
&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__blog_2009_09_18.paganfest.2009__1&quot; name=&quot;fn__blog_2009_09_18.paganfest.2009__1&quot; id=&quot;fn__blog_2009_09_18.paganfest.2009__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
the real genre is folk-metal&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__blog_2009_09_18.paganfest.2009__2&quot; name=&quot;fn__blog_2009_09_18.paganfest.2009__2&quot; id=&quot;fn__blog_2009_09_18.paganfest.2009__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
They only have two ablums, but there will be more in future.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_footer level1&quot;&gt;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2009/09/18.paganfest.2009&quot; class=&quot;wikilink1 blogtng_permalink&quot;&gt;paganfest 2009&lt;/a&gt;
    &amp;middot;
    2009-09-18 00:46    &amp;middot;
        &amp;middot;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2009/09/18.paganfest.2009#the__comments&quot; class=&quot;wikilink1 blogtng_commentlink&quot;&gt;0 Comments&lt;/a&gt;
    &amp;middot;
    Tags: &lt;ul class=&quot;blogtng_tags&quot;&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=blog&quot; class=&quot;tag&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=music&quot; class=&quot;tag&quot;&gt;music&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=party&quot; class=&quot;tag&quot;&gt;party&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogtng_list&quot;&gt;

&lt;h1&gt;&lt;a name=&quot;bloggingwithdokuvimki&quot; id=&quot;bloggingwithdokuvimki&quot; href=&quot;/blog/2009/09/17.blogging.with.dokuvimki&quot;&gt;Blogging with DokuVimKi&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

If you love &lt;a href=&quot;http://www.dokuwiki.org&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.dokuwiki.org&quot;  rel=&quot;nofollow&quot;&gt;Dokuwiki&lt;/a&gt; and &lt;a href=&quot;http://www.vim.org&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.vim.org&quot;  rel=&quot;nofollow&quot;&gt;Vim&lt;/a&gt;
you also propably know
&lt;a href=&quot;http://www.chimeric.de/projects/dokuwiki/dokuvimki&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.chimeric.de/projects/dokuwiki/dokuvimki&quot;  rel=&quot;nofollow&quot;&gt;DokuVimKi&lt;/a&gt;, but do you use
it for blogging? I do, sometime at least, but what me really bugged, was that
there is no template, like the web frontend provides. But Vim wouldn&amp;#039;t be Vim,
if it couldn&amp;#039;t be fixed. So here is my solution.
&lt;/p&gt;

&lt;p&gt;
To get it working the way I use DokuVimKi you just need to follow the following
steps:

&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;howtoinstall&quot; id=&quot;howtoinstall&quot;&gt;How to install&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;/div&gt;

&lt;h5&gt;&lt;a name=&quot;theshellalias&quot; id=&quot;theshellalias&quot;&gt;The shell alias&lt;/a&gt;&lt;/h5&gt;
&lt;div class=&quot;level5&quot;&gt;

&lt;p&gt;
Put this function into your shell configuration (&lt;em&gt;.zshrc&lt;/em&gt;, &lt;em&gt;.bashrc&lt;/em&gt;)
&lt;/p&gt;

&lt;p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;function&lt;/span&gt; viDokuVimKiBlog&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;re4&quot;&gt;$#&lt;/span&gt; &lt;span class=&quot;re5&quot;&gt;-lt&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span class=&quot;kw1&quot;&gt;then&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;You should give your blog article a title!&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;kw3&quot;&gt;return&lt;/span&gt;
    &lt;span class=&quot;kw1&quot;&gt;fi&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;TITLE&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&amp;quot;$*&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;re2&quot;&gt;DW_PATH&lt;/span&gt;=blog:&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw2&quot;&gt;date&lt;/span&gt; +&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;Y:&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;m:&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;d&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;.&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;kw3&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;${TITLE}&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'s# #.#g'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;`&lt;/span&gt;
    &lt;span class=&quot;kw2&quot;&gt;vim&lt;/span&gt; +DokuVimKi +&lt;span class=&quot;st0&quot;&gt;&amp;quot;DWNew &lt;span class=&quot;es3&quot;&gt;${DW_PATH}&lt;/span&gt;&amp;quot;&lt;/span&gt; +&lt;span class=&quot;st0&quot;&gt;&amp;quot;silent! 0r ~/.vim/templates/blog.dokuwiki.tpl&amp;quot;&lt;/span&gt; \
    +&lt;span class=&quot;st0&quot;&gt;&amp;quot;%s/%TITLE%/&lt;span class=&quot;es3&quot;&gt;${TITLE}&lt;/span&gt;/g&amp;quot;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;kw3&quot;&gt;alias&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;viblog&lt;/span&gt;=&lt;span class=&quot;st_h&quot;&gt;'viDokuVimKiBlog'&lt;/span&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;/div&gt;

&lt;h5&gt;&lt;a name=&quot;thetemplate&quot; id=&quot;thetemplate&quot;&gt;The template&lt;/a&gt;&lt;/h5&gt;
&lt;div class=&quot;level5&quot;&gt;

&lt;p&gt;

Create a template diretory:
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;mkdir&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.vim&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;templates&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
Create you template called &lt;em&gt;blog.dokuwiki.tpl&lt;/em&gt;:
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; EOF &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; ~&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;.vim&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;templates&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;blog.dokuwiki.tpl
====== &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;TITLE&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; ======
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
~~NOTOC~~
EOF&lt;/pre&gt;

&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;howtouse&quot; id=&quot;howtouse&quot;&gt;How to use&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;

The next time you want to blog you can start the whole environment with
&lt;/p&gt;

&lt;p&gt;
&lt;pre class=&quot;code bash&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; viblog This is a new entry to my blog&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
This will start vim and create a new page in the namespace defined by the
&lt;strong&gt;DW_PATH&lt;/strong&gt; variable in your shell configuration. You may need to modify it. I
use the following namespace to blog:
&lt;pre class=&quot;code&quot;&gt;
  blog:%year%:%month%:%day%.%title_of_entry%
&lt;/pre&gt;

&lt;/p&gt;

&lt;/div&gt;

&lt;h4&gt;&lt;a name=&quot;updates&quot; id=&quot;updates&quot;&gt;Updates&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;level4&quot;&gt;

&lt;p&gt;
&lt;strong&gt;Update #1&lt;/strong&gt;: I&amp;#039;ve fixed the &lt;strong&gt;viDokuVimKiBlog()&lt;/strong&gt; function. Within the if-fi-statement was an &lt;em&gt;exit&lt;/em&gt;, which causes your shell/terminal to logout/close. The correct function is a simple &lt;em&gt;return&lt;/em&gt;.
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;Update #2&lt;/strong&gt;: Fixed some stupid typos.
&lt;/p&gt;



&lt;/div&gt;
&lt;div class=&quot;blogtng_footer level1&quot;&gt;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2009/09/17.blogging.with.dokuvimki&quot; class=&quot;wikilink1 blogtng_permalink&quot;&gt;Blogging with DokuVimKi&lt;/a&gt;
    &amp;middot;
    2009-09-17 15:45    &amp;middot;
        &amp;middot;
    &lt;a href=&quot;http://wiki.goatpr0n.de/blog/2009/09/17.blogging.with.dokuvimki#the__comments&quot; class=&quot;wikilink1 blogtng_commentlink&quot;&gt;0 Comments&lt;/a&gt;
    &amp;middot;
    Tags: &lt;ul class=&quot;blogtng_tags&quot;&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=blog&quot; class=&quot;tag&quot;&gt;blog&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=dokuvimki&quot; class=&quot;tag&quot;&gt;dokuvimki&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=dokuwiki&quot; class=&quot;tag&quot;&gt;dokuwiki&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
	&lt;li&gt;&lt;div class=&quot;li&quot;&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/?btng[post][tags]=vim&quot; class=&quot;tag&quot;&gt;vim&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
&lt;div class=&quot;blogtng_pagination&quot;&gt;&lt;span class=&quot;blogtng_pages&quot;&gt;&lt;span class=&quot;cur&quot;&gt;1&lt;/span&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=5&amp;amp;btng[pagination][tags]=&quot;&gt;2&lt;/a&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=10&amp;amp;btng[pagination][tags]=&quot;&gt;3&lt;/a&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=15&amp;amp;btng[pagination][tags]=&quot;&gt;4&lt;/a&gt;  &lt;span class=&quot;sep&quot;&gt;...&lt;/span&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=105&amp;amp;btng[pagination][tags]=&quot;&gt;22&lt;/a&gt; &lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=110&amp;amp;btng[pagination][tags]=&quot;&gt;23&lt;/a&gt; &lt;/span&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/blogspace/goatblog?btng[pagination][start]=5&amp;amp;btng[pagination][tags]=&quot; class=&quot;next&quot;&gt;Older Posts &amp;gt;&lt;/a&gt; &lt;/div&gt;</description>
            <author>Julian Knauer</author>
        <category>blogspace</category>
            <pubDate>Tue, 08 Jun 2010 19:27:16 +0200</pubDate>
        </item>
        <item>
            <title>blog:2010:06:02.fixing.my.broken.monitor</title>
            <link>http://wiki.goatpr0n.de/blog/2010/06/02.fixing.my.broken.monitor?rev=1275480222</link>
            <description>
&lt;h1 class=&quot;sectionedit9&quot;&gt;&lt;a name=&quot;fixingmybrokenmonitor&quot; id=&quot;fixingmybrokenmonitor&quot;&gt;Fixing my broken monitor&lt;/a&gt;&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;

Two month ago my old monitor, a Samsung SyncMaster 930BF broke. It is quite old, but I really got used to work with two monitors. At first it took some time before the monitor displayed something after turning it on, or it switched between modes and the green power LED blinked rapidly. After some more days the display stayed black. Id did some research on the internet and found an &lt;a href=&quot;http://www.tomshardware.co.uk/forum/247964-15-viewsonic-vx922-monitor-black-screen-green-power-light-flashes&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.tomshardware.co.uk/forum/247964-15-viewsonic-vx922-monitor-black-screen-green-power-light-flashes&quot;  rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; describing my problem. If it was true, I may be able to fix that.
Today I decided to loosen the screws of the old monitor an look for a bloated capacitor&lt;sup&gt;&lt;a href=&quot;#fn__1&quot; name=&quot;fnt__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;.
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT9 SECTION &quot;Fixing my broken monitor&quot; [1-754] --&gt;
&lt;h2 class=&quot;sectionedit10&quot;&gt;&lt;a name=&quot;astoryofsuccess&quot; id=&quot;astoryofsuccess&quot;&gt;A story of success&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
As the headline assumes, I&amp;#039;ve been successful! But I&amp;#039;ve docuemented some of my actions using photos and those I won&amp;#039;t keep back.
&lt;/p&gt;

&lt;p&gt;
Looking a the first picture, you&amp;#039;ll see the bloated capacitor, after locating the pins on the back, I had to remove it. I&amp;#039;ve used my soldering iron a used a temperatur around 400°C. The solder on factory soldered circuits can be really tough. To “absorb” the solder I am using a vaccuum pump.
&lt;/p&gt;

&lt;p&gt;
Luckily I had some replacement for the the old capacitor. They used a 1000µF-16v capacitor and so I started to re-solder the replacement. In the final step I cut the legs of the newly installed capacitor and reassembled the monitor, to test it.
&lt;/p&gt;

&lt;p&gt;
I had to re-open it three times, before I got some results, because I&amp;#039;ve forgotten to reconnect all cables! So check twice, if everything is properly connected and in place.
&lt;/p&gt;

&lt;p&gt;
The last picture shows the result of my work! The display is working again and turned on without any delay!
&lt;/p&gt;
&lt;table class=&quot;gallery gallery_center&quot; align=&quot;center&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/001_bad_guy.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;001_bad_guy.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/001_bad_guy.png?w=120&amp;amp;h=76&quot; width=&quot;120&quot; height=&quot;76&quot; border=&quot;0&quot; alt=&quot;001_bad_guy.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/002_removing.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;002_removing.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/002_removing.png?w=120&amp;amp;h=98&quot; width=&quot;120&quot; height=&quot;98&quot; border=&quot;0&quot; alt=&quot;002_removing.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/003_removing.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;003_removing.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/003_removing.png?w=101&amp;amp;h=120&quot; width=&quot;101&quot; height=&quot;120&quot; border=&quot;0&quot; alt=&quot;003_removing.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/004_replacement.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;004_replacement.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/004_replacement.png?w=63&amp;amp;h=119&quot; width=&quot;63&quot; height=&quot;119&quot; border=&quot;0&quot; alt=&quot;004_replacement.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/005_cut.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;005_cut.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/005_cut.png?w=118&amp;amp;h=120&quot; width=&quot;118&quot; height=&quot;120&quot; border=&quot;0&quot; alt=&quot;005_cut.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://wiki.goatpr0n.de/_detail/blog/2010/06/006_success.png?id=blog%3A2010%3A06%3A02.fixing.my.broken.monitor&quot; title=&quot;006_success.png&quot; &gt;&lt;img src=&quot;http://wiki.goatpr0n.de/_media/blog/2010/06/006_success.png?w=120&amp;amp;h=95&quot; width=&quot;120&quot; height=&quot;95&quot; border=&quot;0&quot; alt=&quot;006_success.png&quot; class=&quot;tn&quot;  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;!-- EDIT10 SECTION &quot;A story of success&quot; [755-1768] --&gt;
&lt;h2 class=&quot;sectionedit11&quot;&gt;&lt;a name=&quot;awordofcaution&quot; id=&quot;awordofcaution&quot;&gt;A word of caution&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
Here is a warning to everyone who wants to try this, too. You are working with “high voltages”&lt;sup&gt;&lt;a href=&quot;#fn__2&quot; name=&quot;fnt__2&quot; id=&quot;fnt__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt;. Capacitors can hold voltages over a long duration, so use a multimeter to check for remaining voltages.
&lt;/p&gt;

&lt;p&gt;
Also there is now guarantee, that this is working for &lt;em class=&quot;u&quot;&gt;your&lt;/em&gt; broken monitor. It also voids the warranty of your device! I only tried to fix it my self, because the monitor is far beyond any warranty claim!
&lt;/p&gt;

&lt;p&gt;
You have been warned!
&lt;/p&gt;

&lt;/div&gt;
&lt;!-- EDIT11 SECTION &quot;A word of caution&quot; [1769-] --&gt;&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; name=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;a href=&quot;http://en.wikipedia.org/wiki/Capacitor_plague&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://en.wikipedia.org/wiki/Capacitor_plague&quot;  rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Capacitor_plague&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__2&quot; id=&quot;fn__2&quot; name=&quot;fn__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
for a computer scientist they are fairly high&lt;/div&gt;
&lt;/div&gt;
</description>
            <author>Julian Knauer</author>
        <category>blog:2010:06</category>
            <pubDate>Wed, 02 Jun 2010 14:03:42 +0200</pubDate>
        </item>
    </channel>
</rss>
