After upgrading Plesk from an old, but working, 8.6.0 to a recent version everything worked fine afterwards. Then I did the “mistake” and enabled the build-in greylisting feature. Out of sudden I wasn’t able to send a mail anymore. I got a “qq trouble in home directory” error message.

Hmm … Bad!. Ok. First I checked the permissions of the qmail installation. All fine. So I searched around. A lot of people out there are having the same problem. It’s the greylisting feature! Plesk qmail thinks we are an extern sender and routes even local domains through the greylist. Bump!

So you may think: “A lot of people are having the same problem, so there is a quick solution!”. Nope – There isn’t! It take some a lot of hours to find a solution by myself. At all it’s easy – if you know how :-)

So what to do? Since Plesk Version 9.0 you can choose your MTA between qmail and postfix. However the postfix implementation is causing more problems then the qmail one. So I still use qmail. Via the autoinstaller script of Plesk you can easily switch between these two MTAs. And that’s was the solution of my qmail “qq trouble in home directory” problem.
Start the autoinstaller /usr/local/psa/admin/bin/autoinstaller. On the component list choose Postfix mailserver and continue. The script will uninstall the qmail mailserver and install the postfix mailserver. All current mails will keep in place. So don’t worry (however a backup is always and every time a good idea :-) ). The completion of the script takes several minutes. After that do the same thing but select Qmail mailserver. For me it worked fine and the “qq trouble in home directory” error was gone.

Quick ToDo:

  • Start /usr/local/psa/admin/bin/autoinstaller
  • Select Postfix mailserver as mailserver
  • Finish the installation
  • Start /usr/local/psa/admin/bin/autoinstaller
  • Select Qmail mailserver as mailserver
  • Finish the installation
  • Done
By Roger Sennert, 27 August 2010, 13:51 o'clock

Today just a shorty: Enable gzip!

When using php set output_handler = ob_gzhandler. So every php request will be compressed.

Also you can use the defalte module of you apache2. In that case javascript, pure html and css will also be compressed.

  • activate the module a2enmod deflate
  • add some lines to you configureation (vhost or globle whatever you want) (global in this case)
    <Location />
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/php text/css text/js text/javascript text/javascript-x application/javascript application/x-javascript text/x-js
    </IfModule>
    </Location>
  • Don’t forget to restart the server! Do not just reload the configuration!

PS: To check the content-type on a linux command line of a web page try
lynx -head -dump http://www.google.com
PPS: Website to check the state of compression: http://www.gidnetwork.com/tools/gzip-test.php

By Roger Sennert, 20 August 2010, 12:39 o'clock

When you are moving to a new Plesk Server the Migration Manager of Plesk is a cool feature. It helps you to keep out of a lot of trouble. But unfortunately it also add some trouble.
When you try to migrate a Mailman maillinglist the Migration Manager first adds a new list with default settings and then add user per user to list. But there is on heavy pitfall: The defaults say to send a welcome message to every new user. *bumm*!
So every user will get again (or the first time :-) ) the welcome message of the list. In general this isn’t a good idea.

To avoid this problem we need to change the defaults of the Mailman settings. We need to add a line to the file mm_cfg.py Usually you’ll find the file at /usr/lib/mailman/Mailman. Edit the file and add

DEFAULT_SEND_WELCOME_MSG = No

If you like you can take a look at the file Defauls.py in the same directory. There you’ll find all other defaults. If you want to override one of these settings you just need to add an other line to the mm_cfg.py file.

By Roger Sennert, 29 April 2010, 8:30 o'clock

If you ever need to install a Typo3 4.3 or higher on a Strato you may encounter a problem with ImageMagick. First of all you need an package which supports ImageMagick! If you package supports it then you may have the problem that ImageMagick Version 4.2.9 will not work and gives you that error: “There was no result from the ImageMagick operation“.

To solve this go to the All Configuration section of your Typo3 4.3 or higher installation. Search for [im_stripProfileCommand] and set it to blank.

That’s it!

By Roger Sennert, 23 December 2009, 9:23 o'clock

You put your computer into hibernation. Everything seems to fine and you went off. When you come back your PC is running. How? Mostly since you have a cordless mouse which sends from time to time a signal. Or you just moved the mouse.
After checking all BIOS settings you were not able to find the reason. This is because the main reason for the problem is your OS: Windows 7 or Windows Vista. They have their own build-in power management.  So you need to change the settings there.

So, if you have the problem that your computer awakes when moving the mouse after the hibernation there is a simple solution:

  • Open the “Device Manager”
  • Collapse “Mice and other pointing devices”
  • Select your mouse
  • Right click and select “Properties”
  • Switch to the “Power Management” tab
  • Deselect “Allow this device to wake the computer”
  • Done!
By Roger Sennert, 13 August 2009, 7:57 o'clock

When you change the default translation of your Putty to UTF-8 you can use all the advantages of that. But there is one thing witch is strange. If you call YAST you’ll see wired characters instead of the normal lines.
Of course you set “Handling of line drawing characters” to “Use Unicode line drawing code points“. But you need to do one more little thing.
Set “Connection->Data->Terminal-type string to” “linux” instead of the default “xterm” und you’ll be happy again!

By Roger Sennert, 29 July 2009, 9:16 o'clock

To speed up the render process of Typo3 of you may try this extension: nc_staticfilecache

This extension will cache each rendered page of Typo3 into a static file. When a user tries to access this page the next time the page is delivered directly.
Of course the extension takes care of the cache timeout configuration and pages which contains plugins which need to render each time.
It will reduce the server load of a Typo3 installation a lot. Just give it a try!

By Roger Sennert, 24 March 2009, 10:37 o'clock

When you setup your Typo3 installation with realURL you may also want to add a more informative 404 error page. At a first look this doesn’t seems to be a problem. Just open your localconf.php and add these lines at the end of the file.


$TYPO3_CONF_VARS["FE"]["pageNotFound_handling"] = 'http://www.example.com/not-found-404.html';
$TYPO3_CONF_VARS["FE"]["pageNotFound_handling_statheader"] = 'HTTP/1.1 404 Not Found';

An other way is to use the Install Tool -> All Configuration and setting the fields.

Try typing a wrong URL and be happy to see your custom 404 error page.
But stop! There is a small problem. You are not able to see this problem now. But if you try to add a Google site verification you’ll have the problem. So why? This problem is, that Typo3 redirects to the error page. This means not a 404 error code but a 301 followed by 200 (you custom error page) is send. That’s bad!
OK! So we need another way to setup your custom 404 error page in Typo3. Luckily we can setup not only a custom page but also a custom script! That’s where we’ll start:


$TYPO3_CONF_VARS["FE"]["pageNotFound_handling"] = 'USER_FUNCTION:fileadmin/pageNotFoundHandling.php:user_pageNotFound->pageNotFound';

This will execute the script fileadmin/pageNotFoundHandling.php which contains these:


<?php
class user_pageNotFound {
    function pageNotFound($param,$ref) {
        print "<html>\n<head>\n<title>404 Not found</title>\n";
        print "<meta http-equiv="refresh" CONTENT="0;URL=/not-found.html">\n";
        print "</head>\n<body>\n";
        print "<!--
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
            Just a placeholder to reach the limit of a custom 404 page\n
        -->";
        print "</body>\n</html>\n";
    }
}
?>

It’s important not to use the Header( "Location: .."); statement since this is exactly what Typo3 does per default. Only the refresh via the meta tag will work!
Don’t forget to change the path to your error page :-)

By Roger Sennert, 24 March 2009, 10:20 o'clock

If you are working on an IMAP Server and using Enigmail to crypt and decrypt mail you may encounter a problem with decoded attachments. OpenPGP is not able to decrypt the whole message since the attachment is loaded on demand. If you want to change this just set this settings in you mail client installation:

user_pref("mail.server.default.mime_parts_on_demand", false);

By Roger Sennert, 19 March 2009, 18:58 o'clock

If your Tyop3 installation is a bit slow the following tips my help to speed up you site.

  • Use a php cache module
  • Adjust the caching parameter of you mysql Installation.
    For me these setting helps for a performance boost
    key_buffer = 32M
    table_cache = 128
    query_cache_size = 64M
    query_cache_type = 1
    log-bin
  • Try this Typo3 extension: nc_staticfilecache
By Roger Sennert, 15 December 2008, 12:16 o'clock