<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Mike`s Blog - Hosting</title>
    <link>http://www.java-community.de/</link>
    <description>Keep it simple, stupid!</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    
    

<item>
    <title>Sender Policy Framework (SPF)</title>
    <link>http://www.java-community.de/archives/73-Sender-Policy-Framework-SPF.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/73-Sender-Policy-Framework-SPF.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    &lt;br /&gt;
A few weeks ago I wanted to &lt;strong&gt;make all my hosted domains SPF-enabled&lt;/strong&gt;. &lt;a href=&quot;http://www.openspf.org/Project_Overview&quot;&gt;Sender Policy Framework&lt;/a&gt; is a great way to prevent forged mails. With SPF, mail servers check whether a mail is allowed to be sent by a specific server.&lt;br /&gt;
&lt;br /&gt;
I&#039;m going to be restrictive here and &lt;strong&gt;only allow our mail server to send mails from our hosted domains&lt;/strong&gt;. This will for example stop spam from &lt;tt&gt;sdfjnsd@mydomain.com&lt;/tt&gt; to &lt;tt&gt;mike@mydomain.com&lt;/tt&gt;. Of course, that&#039;s not the only thing which will be made a lot harder for spammers. The domain itself is protected much better and spammers seem to refuse misusing domains with SPF information.&lt;br /&gt;
&lt;br /&gt;
Before activating it on all life domains, I took a &lt;strong&gt;private domain to test&lt;/strong&gt; the configuration with. I changed the domain name server zone file for &lt;tt&gt;mhaller.de&lt;/tt&gt; to contain the following TXT resource record:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.java-community.de/archives/73-Sender-Policy-Framework-SPF.html#extended&quot;&gt;Continue reading &quot;Sender Policy Framework (SPF)&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 17 Aug 2008 15:51:38 +0200</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/73-guid.html</guid>
    
</item>
<item>
    <title>VirtueMart Saferpay</title>
    <link>http://www.java-community.de/archives/53-VirtueMart-Saferpay.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/53-VirtueMart-Saferpay.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    Today I released &lt;a href=&quot;http://www.smartwerkz.com/confluence/download/attachments/21757956/virtuemart_saferpay-1.0.0.zip?version=1&quot;&gt;v1.0.0&lt;/a&gt; of the &lt;a href=&quot;http://www.smartwerkz.com/confluence/display/WWW/Zahlungsmethode+Saferpay&quot;&gt;E-Payment module Saferpay for VirtueMart 1.0.x&lt;/a&gt;. Hopefully it&#039;s of help for people who want to integrate the &lt;a href=&quot;http://www.saferpay.com/&quot;&gt;swiss E-Payment solution provider&lt;/a&gt; into their &lt;a href=&quot;http://virtuemart.net/&quot;&gt;VirtueMart&lt;/a&gt; shops.&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sun, 17 Feb 2008 11:58:33 +0100</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/53-guid.html</guid>
    
</item>
<item>
    <title>== &lt;&gt; eq</title>
    <link>http://www.java-community.de/archives/47-eq.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/47-eq.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=47</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    A customer requested to disable all spam filter rules for his accounts. He suspected to miss mails, so he really wanted us to switch off all filters for his accounts.&lt;br /&gt;
&lt;br /&gt;
To implement that within short time, I decided to change the maildrop filter script &lt;code&gt;/etc/courier/maildroprc&lt;/code&gt;. I added the following snippet.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;
# Disable all filters for customer XYZ
if ( $HOST == &quot;example.org&quot; )
{
  log &quot;All filters disabled&quot;
  to $DEFAULT
  exit
}
else
{
  log &quot;Normal filtering rules apply&quot;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Well, &lt;strong&gt;this snippet does not work as expected&lt;/strong&gt;. It will always jump into the first case &quot;All filter disabled&quot;. As the maildroprc is the general script, which is applied for all incoming mails, the spam filters were disabled practically for all customers. After half a day, my own spam trap account was already fully and couldn&#039;t hold any more spam.&lt;br /&gt;
&lt;br /&gt;
So what was going wrong? I read through the courier documentation and found it: &lt;strong&gt;== is a numerical comparison. Text comparison must be done using eq&lt;/strong&gt;. I should have known it better, as I&#039;m a Java Developer. I have never seen any maildroprc example script using eq, so I didn&#039;t expect bash-like expressions in there.&lt;br /&gt;
&lt;br /&gt;
The correct snippet:&lt;br /&gt;
&lt;pre&gt;
# Disable all filters for customer XYZ
if ( $HOST eq &quot;example.org&quot; )
{
  log &quot;All filters disabled&quot;
  to $DEFAULT
  exit
}
else
{
  log &quot;Normal filtering rules apply&quot;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
P.S.: My servers are, hours later, still working on filtering the spam again which was queued. I&#039;ve got a dedicated machine for running Spamassassin workers, and it&#039;s load is .. well high enough.&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 02 Feb 2008 10:23:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/47-guid.html</guid>
    
</item>
<item>
    <title>Exceeding mail quota</title>
    <link>http://www.java-community.de/archives/38-Exceeding-mail-quota.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/38-Exceeding-mail-quota.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=38</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    One of my customers of my &lt;a href=&quot;http://www.smartwerkz.com/&quot;&gt;hosting business&lt;/a&gt; called me and was really upset. &lt;strong&gt;He wasn&#039;t receiving any emails any more&lt;/strong&gt;. I checked the system, the mailserver and the logs and could not find a problem on our site. Then, i checked the customers email accounts manually. He exceeded his quota on his main email account &lt;code&gt;info@foo.bar&lt;/code&gt; (i mention that, because it&#039;s a catch-all account and thus receives a lot of spam).&lt;br /&gt;
&lt;br /&gt;
I told him that his quota was exceeded and he has to delete old mails to make room for new ones. Unfortunately, he already did that quite regularly. After a talk with the &quot;tech-guy&quot; of the customer, the cause of the problem became pretty obvious: the customer had his own mailserver, which uses &lt;a href=&quot;http://fetchmail.berlios.de/&quot;&gt;fetchmail&lt;/a&gt; to gather mails from our mailserver. Our mailserver automatically moves high-level spam into a subfolder of the users mail inbox: &quot;Inbox\Junk&quot;. &lt;strong&gt;His fetchmail is not configured to retrieve subfolders&lt;/strong&gt;, so only the inbox was cleared, the Junk folder became bigger and bigger and finally filled the box up to the quota limit.&lt;br /&gt;
&lt;br /&gt;
The user was unaware of that little technical detail, as he also has a &quot;Junk&quot; folder in his mailer application and it was empty according to him.&lt;br /&gt;
&lt;br /&gt;
I solved the problem by automatically deleting mails in the Junk folder which are older than 2 weeks using a simple cron job:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;find /var/spool/mail -name &amp;quot;.Junk&amp;quot; -type d | \&lt;br /&gt;&lt;br /&gt;xargs -I &amp;quot;%&amp;quot; find % -type f -mtime 14&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 28 Dec 2007 17:51:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/38-guid.html</guid>
    
</item>
<item>
    <title>Mailserver cleanup</title>
    <link>http://www.java-community.de/archives/34-Mailserver-cleanup.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/34-Mailserver-cleanup.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=34</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    &lt;!-- s9ymdb:12 --&gt;&lt;img width=&#039;76&#039; height=&#039;110&#039; style=&quot;float: right; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.java-community.de/uploads/Spamfilter-Architektur-Overview_small300px.serendipityThumb.png&quot; alt=&quot;&quot; /&gt;I used my free time today to clean up my server and to work on some issues I planned for some time. &lt;a href=&quot;http://www.smartwerkz.com/confluence/display/WWW/Spamfilter&quot;&gt;My mailserver setup&lt;/a&gt; had served 300000 mails in the last three days (that&#039;s one mail per second).&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://www.java-community.de/archives/34-Mailserver-cleanup.html#extended&quot;&gt;Continue reading &quot;Mailserver cleanup&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 21 Nov 2007 18:24:12 +0100</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/34-guid.html</guid>
    
</item>
<item>
    <title>MySQL's case-sensitivity</title>
    <link>http://www.java-community.de/archives/2-MySQLs-case-sensitivity.html</link>
            <category>Hosting</category>
    
    <comments>http://www.java-community.de/archives/2-MySQLs-case-sensitivity.html#comments</comments>
    <wfw:comment>http://www.java-community.de/wfwcomment.php?cid=2</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.java-community.de/rss.php?version=2.0&amp;type=comments&amp;cid=2</wfw:commentRss>
    

    <author>info@mhaller.de (Mike Haller)</author>
    <content:encoded>
    Yesterday, we transferred the database of a custgomer from his Windows machine to our linux-based database server. At the same time, we wanted to get this administration frontend working again. It was also deployed on that Windows machine, running on a Sun Application Server against the local MySQL database.&lt;br /&gt;
&lt;br /&gt;
The problem with MySQL is, besides some other issues, that it is case-sensitive. Yes, MySQL treates database and table names case-sensitive if it runs on a case-sensitive file system. Hence, copying the database from a Windows machine to a Linux machine by exporting and reimporting created mixed-case mysql data files. Hence, the applications who access this database only used lower-case names. The SQL standard clearly states that identifiers are not case-sensitive. MySQL breaks that. There is a configuration parameter which makes mysql do auto-conversion. It will then automatically lower-case tablenames in the SQL statements.&lt;br /&gt;
&lt;br /&gt;
However, it is not a good idea to do that with existing databases as this will break existing applications. Mysql won&#039;t find the files which are already mixed-case any more.&lt;br /&gt;
&lt;br /&gt;
So, we needed to set up a second mysql instance with the case-sensitivity configuration parameter set to the value 1. That means, it will lower-case all tablenames and filenames automatically (on creation and within SQL statements).&lt;br /&gt;
&lt;br /&gt;
To start a second mysql instance on a Gentoo-based system, edit /etc/conf.d/mysql&lt;br /&gt;
&lt;blockquote&gt;
mysql_slot_0=()
mysql_slot_0_1=(
   &quot;mycnf=/etc/mysql/my_second.cnf&quot;
   &quot;server-id=3&quot;
   &quot;port=3307&quot;
)
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
The my_second.cnf contains the configuration parameter:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
[mysqld]
...
set-variable=lower_case_table_names=1
...
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Now, import your existing backup into the second mysql instance. You should probably use the &lt;code&gt;--host&lt;/code&gt; and &lt;code&gt;--port&lt;/code&gt; parameters, so your data won&#039;t accidently being imported into your primary mysql installation. Specify &lt;code&gt;127.0.0.1&lt;/code&gt; instead of &lt;code&gt;localhost&lt;/code&gt; if he still connects to the primary instance. 
    </content:encoded>

    <pubDate>Sat, 30 Dec 2006 00:00:00 +0100</pubDate>
    <guid isPermaLink="false">http://www.java-community.de/archives/2-guid.html</guid>
    
</item>

</channel>
</rss>