Redirect webmail for Plesk Onyx

Recently I updated my Plesk server from v12.5 to Onyx v17. I had setup many custom configurations for SSL related matters like smtp/imap/pop and webmail. After upgrading to Onyx I found out that all of these custom configurations were not needed any more because everything could be configured from the plesk panel!

The way I had setup things was redirect webmail for all domains to the webmail of my central domain for which I had installed an SSL certificate (and also my hosting logo!). So this way everyone would only use an https site to login to their emails. I could not find an option to do this in Onyx panel but I found the “proper” way to do it so that my configs would never be overwritten!

What you have to do is create a custom template, copy the webmail template and change it according to your needs.

Disclaimer: Everything I say is valid for CentOS server and I can not be sure if all is true for other distributions!

Before setting up the redirect you have to setup SSL for a webmail!
Go to your domains list in plesk panel and select the domain that you will use for webmail.
Choose “SSL/TLS certificates”, select an avaiable certificate (or upload a new one) and press “Secure Webmail”

Now create the custom webmail template folder (if it does not already exist)

cd /usr/local/psa/admin/conf/templates/
mkdir -p custom/webmail

Copy the default webmail config file

cd custom/webmail
cp -a ../../default/webmail/webmail.php

Edit this file to add your redirect (I added below lines immediately after “UseCanonicalName Off”)

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ [NC]
RewriteRule (.*) https://webmail.EXAMPLE.COM/

You can have each domain redirect to each own https site by using this rewrite rule instead of specific domain (last line above)

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

After saving this file you have to apply it for all your domains by using this command

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Ready! Enjoy your https protected webmail!

Sources:
https://kb.plesk.com/en/129260
https://kb.plesk.com/en/123648

WSO2 for PHP installation on Centos 6

WSO2 for PHP is a Web Services framework that works as a PHP extension and provides support for key WS-* specifications. Using this framework one can easily create server and client side Web Service applications that can easily integrate with Java or .NET systems (which are both the most common languages used for building Web Services).

Installation of this framework on most linux systems used to be easier on earlier versions of WSO2 when rpm and deb packages were available for download. This is not the case anymore.

Continue reading “WSO2 for PHP installation on Centos 6”

Streaming to shoutcast with libshout

After setting up a shoutcast server I tried to find a way to stream my music through it. When I was a windows user winamp with the shoutcast DSP plugin was a nice solution. But now I wanted to stream music that resides on my linux home server. The Shoutcast Transcoder that can be used for this purpose requires a paid license for mp3 streaming. So libshout from Icecast with a perl binding comes to rescue!

Continue reading “Streaming to shoutcast with libshout”

windows live on your website!

It is easy to add windows live chat to your website between yourself and your visitors. First you have to go here and select the option that says “Allow anyone on the web to see my presence and send me messages.” and click Save. Now your website visitors will be able to chat with you. Then you select “Create HTML” and choose one of the 3 options available for either displaying a chat window or just an online/offline image that when clicked will direct your visitor to a dedicated chat window.

If you want to hack the code a little bit here are some examples:

Continue reading “windows live on your website!”

Message Threads in Thunderbird 3

By default, Thunderbird 3 uses strict threading which means that threading by subject is disabled. There are two settings that control this behaviour though: mail.strict_threading and mail.thread_without_re. The first setting enables/disables threading by subject while the second allows subject-threading even if “Re:” isn’t present. There is also a setting new to the 3.x branch called mail.correct_threading which threads correctly regardless of the order messages are added to a folder.

Continue reading “Message Threads in Thunderbird 3”

install Windows Live Messenger 2009 in odd OSes

If you try to install Windows Live Messenger on Windows XP 64 bit or on Windows Server 2003 using the default MS installer you get an error stating that all Windows Live Essentials are not compatible with the running OS. This is not entirely true. What is not compatible is the live installer and not the programs themselves!! So this is the procedure to get the standalone installer for Windows Live Messenger 2009 so that you can install it to any windows OS (I have managed to install it on Win 2K3!)

Continue reading “install Windows Live Messenger 2009 in odd OSes”

VMware ESXi

VMware ESXi is a bare-metal hypervisor. That means that you install it as you would install any other OS and on top of it run your virtual machines. You could ask why not use a VMware server on top of a linux installation. Well it’s because you would have to administer one more linux box with every problem that this would cause (updates that brake stuff, etc). Also ESXi uses minimal resources compared to a VMware server on top of another OS.

The best  news is that ESXi is FREE! You just need to register to the VMware website in order to obtain your free license key (as was the case with VMware server). After that you install it on your server, make some configuration changes (IP address and root password specifically). Then you can connect with your browser to your new ESXi server and download the Infrastructure Client through which you can administer the virtual machines and the ESXi server.

Some tips to get you started can be found here.

Good luck!

(Summary) report in plesk 9.x

In Plesk 8.x you can find a very useful report about space used by each section of a domain (page, mail, logs, etc) by clicking the icon seen in picture 1 below. In plesk 9.x this kind of report is a little hidden. You have to click on the “Statistics” label of the domain and then a drop down menu will reveal this option as seen in picture 2.