How to renew the SSL certificate for dovecot on Ubuntu Linux

To create new SSL certificates for the dovecot pop3 and imap server on Ubuntu, follow these steps:

Make a backup copy of the old key and certificate file

sudo cp /etc/ssl/private/dovecot.key /etc/ssl/private/dovecot.key.old
sudo cp /etc/ssl/certs/dovecot.pem /etc/ssl/certs/dovecot.pem.old

Create the new key file

openssl genrsa -out /etc/ssl/private/dovecot.key 1024

Create the new certificate file, valid for 2 years

openssl req -new -x509 -key /etc/ssl/private/dovecot.key -out /etc/ssl/certs/dovecot.pem -days 730

Then restart dovecot

/etc/init.d/dovecot restart

Manage the postfix mailqueue with postsuper, postqueue and mailq

Postfix provides with postsuper, postqueue and mailq some  shell utilitys to manage the mailqueue.

Here are some examples for common tasks:

List all messages that are in the mailqueue

postqueue -p

The output looks like this:

root@server:/# postqueue -p
 -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
 501CA23B43DB     2182 Thu Dec  3 14:24:39  [email protected]
 (Host or domain name not found. Name service error for type=MX: Host not found, try again)
 [email protected]
-- 8 Kbytes in 1 Requests.

Delete a message by message ID

postsuper -d MessageID

replace MessageID with the ID of the message, e.g. 501CA23B43DB

root@server:/# postsuper -d 501CA23B43DB
 postsuper: 501CA23B43DB: removed
 postsuper: Deleted: 1 message

Remove emails by sender

mailq | tail +2 | awk 'BEGIN { RS = "" }
 # $7=sender, $8=recipient1, $9=recipient2
 { if ($7 == "[email protected]" && $9 == "")
 print $1 }
 ' | tr -d '*!' | postsuper -d -

replace "[email protected]" with the sender email address.

Remove emails by recipient

mailq | tail +2 | awk 'BEGIN { RS = "" }
 # $7=sender, $8=recipient1, $9=recipient2
 { if ($8 == "[email protected]" && $9 == "")
 print $1 }
 ' | tr -d '*!' | postsuper -d -

replace [email protected] with the recipient email address.

Remove emails by sender hostname

mailq | grep senderhostname | awk ‘{ print $1′} | postsuper -d -

replace the word "senderhostname" with the hostname of the email sender.

If your server has very high load and you want to temporarily move all message from the incoming queue to the hold queue, use the command:

postsuper -h ALL

to move the messages back to the incoming queue, use the command:

postsur -r ALL

Instead of the word "ALL" you can also provide a specific message ID to move only one message to or from the hold queue. Message in the hold queue will not processed by postfix until they were requeued with postsuper -r.

The fast magnifying glass for zoom the MAC screen

Want to zoom your MAC screen easy, fast and steplessly?
You only have to keep the CTRL key pressed and use the Mousewheel to zoom in and out.
On new MacBooks you can also use the touchpad with two! fingers up and down to zoom.

Hint: If you don't scroll back to normal view, the screen remains sometimes in a "strange" mode.

Find the .deb package that contains a specific file on Ubuntu or Debian Linux

Sometimes you need to know to which debian or ubuntu package a specific file belongs, e.g. because you deleted a system file and want to reinstall it. There is a handy utility called apt-file which searches for a filename in all debian packages.


apt-get install apt-file

Usage example

search for the file /etc/sysctl.conf

apt-file search /etc/sysctl.conf


apt-file search /etc/sysctl.conf
procps: /etc/sysctl.conf

Now we see that the file is part of the debian / ubuntu package with the name "procps".

How does Ubuntu’s screenshot tool Take Screenshot actually work?

The easiest way to make screenshots is to use Take Screenshot. You find it under Applications/Accessoires.
First change the delaytime for the screenshot from 0 to 1 or 2 seconds. This is the time you have to mark the chosen area. You should be fine with 1 second!

Then choose your screenshot option, e.g. Grab the current window. Klick on Take Screenshot and activate the window you need.


Take Screenshot closes. If all works well, a pop-up comes up to ask where to save the screenshot, which comes a s a .png.


For another screenshot you have to open the application again, so put it best in your panel.

The uncommon thing is that you have to run first Take screenshot and then choose an object, and not the other way round. That's it!

How to install a professional image editing tool (KRITA) for Ubuntu 9.10

KRITA is a free image editing tool that ist pretty versatile and helps you not only to edit images, but also to use it for more artistic work on e.g. tablet PCs. It will surely remind you of Photoshop.
The easiest way to install KRITA is to download it over the Ubuntu Software Center. Do not take the complicated way to install it manually...

First go to Applications/Ubuntu Software Center:


Type in the searchfield KRITA and press Enter to mark KRITA for installation.
As KRITA appears, double click it, and then just klick on the Install button, start the installation and wait some seconds.


Now KRITA should appear checked as it has beeninstalled. That's it!


How to enable active corners aka Exposé in Ubuntu 9.10 with Ubuntu Tweak

If you always wanted the Exposé effect on your Ubuntu Desktop, here you go!  Active corners, known from Mac as Exposé, allow you e.g. to see all your open windows at once just by one mouse move into the corner of the desktop. Very useful if you are a multi-tasking god or goddess!

First open you terminal and copy & paste:

sudo apt-key adv --recv-keys --keyserver FE85409EEAB40ECCB65740816AF0E1940624A220

Log in with your admin password and continue:

sudo gedit /etc/apt/sources.list

Then add the following lines at the end of the file:

deb karmic main
deb-src karmic main

The source of Ubuntu tweak will be added to your repository. Updates for Ubuntu-Tweak will be installed automatically in future. Install Ubuntu-Tweak:

sudo apt-get update
sudo apt-get install ubuntu-tweak

Before using Ubuntu-Tweak, make sure you enabled visual effects for your desktop. Go to System/Preferences/Appearance an check under Visual Effects "Normal".

Check your system tools for Ubuntu-Tweak, open it and go to Desktop, then to Compiz Fusion as you can see here:
tweak tweak2 tweak3

Now you can enable a function for every corner, as you like. That's it.

How to allow webdav connections without https / SSL in Windows 7

By default it is not possible to connect to webdav resources without SSL encryption in Windows 7. To enable unencrypted connections (http and not just https), follow these steps:

Press the keys [Windows] + [R] to open the windows command line and enter


to start the registry editor. Then go to the registry branch:


and change the value for "BasicAuthLevel" to "2" (decimal). Then restart Windows.

How to get a list of all open ports on Windows 7, Vista and XP?

There is a small freeware Utility called CurrPorts from Nirsoft that displays all open ports on windows.

Download CurrPorts to your computer:

32Bit version:

64Bit version:

Unpack the .zip file and double click on the file cports.exe to start CurrPorts. The application will show you a list of all open ports and offers the ability to apply filters on the list.


How to reset the administrator password in ISPConfig 3

If you lost your ISPConfig 3 administrator password, you can reset it with the following SQL query.

UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';

The SQL query sets the password to "admin" for the user "admin", it has to be executed in the ISPConfig mysql database, e.g. with phpmyadmin. If you dont have phpmyadmin installed, then the query can be executed with the mysql commandline utility as well:

Login to the mysql database.

mysql -u root -p

Then enter the password of the mysql root user. To switch to the ISPConfig database, run this command:

use dbispconfig;

And execute the SQL command:

UPDATE sys_user SET passwort = md5('admin') WHERE username = 'admin';

Finally close the mysql shell: