<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Björn Schießle&#039;s Weblog &#187; hacking</title>
	<atom:link href="http://blog.schiessle.org/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.schiessle.org</link>
	<description></description>
	<lastBuildDate>Mon, 17 Jan 2011 19:21:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My Backup Solution</title>
		<link>http://blog.schiessle.org/2009/07/16/my-backup-solution/</link>
		<comments>http://blog.schiessle.org/2009/07/16/my-backup-solution/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 08:07:56 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://www.schiessle.org/blog/?p=344</guid>
		<description><![CDATA[For a long time I have made backups of my home partition by hand, starting from time to time rdiff-backup. But as you can imagine, this approach doesn&#8217;t generate regular and reliable backups. I couldn&#8217;t put this task into a simple cronjob because of two reasons. First I use encrypted hard disks and my backup [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time I have made backups of my home partition by hand, starting from time to time <a href="http://rdiff-backup.nongnu.org/">rdiff-backup</a>. But as you can imagine, this approach doesn&#8217;t generate regular and reliable backups.</p>
<p>I couldn&#8217;t put this task into a simple cronjob because of two reasons. First I use encrypted hard disks and my backup disk is connected via USB and not always on. So before a backup starts I have to turn on my backup disk and make sure, that my home partition and my backup disk is decrypted and mounted. Second I don&#8217;t want the backup happen during my regular work. In my experience such processes often starts in the most annoying moments.</p>
<p>So I decided that I need an semi-automatic backup, which runs during shutdown. The result is this small script which I put in /etc/rc0.d/K05backup.sh:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">currentTime</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">timeUntilNextBackup</span>=<span style="color: #000000;">604800</span>                 <span style="color: #666666; font-style: italic;"># 604800sec = 1week</span>
<span style="color: #007800;">startBackup</span>=<span style="color: #c20cb9; font-weight: bold;">false</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># check if it's time for the next backup</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>nextBackup.log <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">nextBackupTime</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>nextBackup.log<span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$currentTime</span> - <span style="color: #007800;">$nextBackupTime</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #007800;">startBackup</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>                       <span style="color: #666666; font-style: italic;">#time for the next backup</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">startBackup</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$startBackup</span> == <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;It's time for another Backup!&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Don't forget to switch on your backup hard disk before you start!&quot;</span>
    <span style="color: #007800;">repeat</span>=<span style="color: #c20cb9; font-weight: bold;">true</span>
    <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #007800;">$repeat</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Start backup procedure now? (y)es or (n)o? &quot;</span>
        <span style="color: #c20cb9; font-weight: bold;">read</span> char
        <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$char</span> <span style="color: #000000; font-weight: bold;">in</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>y,Y<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span> 
                <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>schiesbn <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
                    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;encrypted HOME partition has to be mounted...&quot;</span>
                    cryptsetup luksOpen <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda6 secureHome
                    <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>secureHome <span style="color: #000000; font-weight: bold;">/</span>home
                <span style="color: #000000; font-weight: bold;">fi</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;encrypted BACKUP partition has to be mounted...&quot;</span>
                cryptsetup luksOpen <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdd1 secureBackup
                <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>secureBackup <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>backup
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting Backup...&quot;</span>;
                rdiff-backup <span style="color: #660033;">--print-statistics</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>schiesbn <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>backup
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;umount backup disk...&quot;</span>
                <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>backup
                cryptsetup luksClose secureBackup
                <span style="color: #666666; font-style: italic;"># calculate the time for the next backup and write it to the log</span>
                <span style="color: #007800;">nextBackup</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$currentTime</span> + <span style="color: #007800;">$timeUntilNextBackup</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$nextBackup</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>nextBackup.log
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;DONE.&quot;</span>
                <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">10</span>   <span style="color: #666666; font-style: italic;">#give me some time to look at the backup statistics</span>
                <span style="color: #007800;">repeat</span>=<span style="color: #c20cb9; font-weight: bold;">false</span><span style="color: #000000; font-weight: bold;">;;</span>
            <span style="color: #7a0874; font-weight: bold;">&#91;</span>n,N<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
                <span style="color: #007800;">repeat</span>=<span style="color: #c20cb9; font-weight: bold;">false</span><span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">esac</span>
    <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>If the last backup is older than 1 week the script asks me, if I want to do another backup. Than I can decide to postpone it or to start it now. If I decide to start the backup procedure I get the opportunity to decrypt my backup and home partition before rdiff-backup starts. After that I can leave the room and be sure that the computer will shutdown after the backup is finished.</p>
<p>Until now this is the best and most reliable, least annoying and most automated solution I could found.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schiessle.org/2009/07/16/my-backup-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jabber Mail Notification</title>
		<link>http://blog.schiessle.org/2009/02/20/jabber-mail-notification/</link>
		<comments>http://blog.schiessle.org/2009/02/20/jabber-mail-notification/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 16:55:29 +0000</pubDate>
		<dc:creator>Björn</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://www.schiessle.org/blog/?p=127</guid>
		<description><![CDATA[I always struggled to find the right mail notification applet for my desktop. Furthermore I always stumble over the question: Why do I have to ask the mail server in a defined time interval &#8220;Do I have a new e-mail?&#8221;. Wouldn&#8217;t it be better if the mail server notifies me if a new e-mail arrives? [...]]]></description>
			<content:encoded><![CDATA[<p>I always struggled to find the right mail notification applet for my desktop. Furthermore I always stumble over the question: Why do I have to ask the mail server in a defined time interval &#8220;Do I have a new e-mail?&#8221;. Wouldn&#8217;t it be better if the mail server notifies me if a new e-mail arrives?<br />
This is probably somehow a new form of the good old question &#8220;mailing list vs bulletin board&#8221; or in general: Do i have to fetch the information or does the information come to me? Personally i always preferred to get the information and not to hunt around for them.</p>
<p>Thinking about this question i realized that notification through <a href="http://www.jabber.org">Jabber</a> would be perfect and the open <a href="http://xmpp.org">XMPP</a> protocol virtually invites one to do such things.</p>
<p>The idea was born. Now the first step was to find a easy to use XMPP implementation for a scripting language like Python, Ruby or PHP. At the end I found a quite nice and easy to use <a href="http://code.google.com/p/xmpphp/">PHP library</a>. While searching such a library I also found this <a href="http://garv.in/serendipity/archives/947-Jabber-E-Mail-Notify.html">guidance (German only)</a>, borrowed some code from it and my solution was born:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// The script gets the input either as an argument, from a REQUEST-variable or from stdin</span>
<span style="color: #666666; font-style: italic;">// If you use it within procmail you will get the input through stdin </span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #990000;">urldecode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// open stdin. Only read the first 4096 character, this should be enough to match</span>
    <span style="color: #666666; font-style: italic;">// the FROM- and  SUBJECT-header</span>
    <span style="color: #000088;">$stdin</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'php://stdin'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$msg</span>   <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$stdin</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;empty&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Get FROM und SUBJECT</span>
        <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'@From:(.*)@i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span><span style="color: #339933;">,</span> <span style="color: #000088;">$from</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'@Subject:(.*)@i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$from</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// now init xmpp and get the notification out</span>
<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'XMPPHP/XMPP.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$conn</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> XMPPHP_XMPP<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'schiessle.org'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5222</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'xmpphp'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'schiessle.org'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$printlog</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$loglevel</span><span style="color: #339933;">=</span>XMPPHP_Log<span style="color: #339933;">::</span><span style="color: #004000;">LEVEL_INFO</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
try <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">connect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">processUntil</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session_start'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">presence</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'me@jabber.server.org'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$conn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">disconnect</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> catch<span style="color: #009900;">&#40;</span>XMPPHP_Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Now I just had to tell procmail to pipe the mails through the PHP script. If you want to get notified about all mails you can simply put this line at the top of your procmail rules (Or maybe at least behind the spam filter rules <img src='http://blog.schiessle.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">:0c
<span style="color: #000000; font-weight: bold;">|</span>php <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>schiessle<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mailnotification.php</pre></td></tr></table></div>

<p>I want to get notified only about some specific mails so I extended my procmail rules in this way:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">:<span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">*</span> ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>To:<span style="color: #000000; font-weight: bold;">|</span>Cc:<span style="color: #7a0874; font-weight: bold;">&#41;</span>.<span style="color: #000000; font-weight: bold;">*</span>foo<span style="color: #000000; font-weight: bold;">@</span>bar-mailinglist.org
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
 	:0c
        <span style="color: #000000; font-weight: bold;">|</span>php <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>schiessle<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mailnotification.php
&nbsp;
        :<span style="color: #000000;">0</span>
        .bar-list<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>That&#8217;s it! All in all it was quite easy to get e-mail notification through Jabber. Now I don&#8217;t have to search for the right applet, configure it etc.. All I have to do is to start my Jabber client and I will get notified about new mails whatever desktop or computer i&#8217;m using.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schiessle.org/2009/02/20/jabber-mail-notification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

