Plesk root E-mail delivery with Qmail
As a sysadmin you want to receive all the server root messages.
If you do not read the local root mail account, you want ALL the root mails to be sent to an external E-mail address. This will need some manual tweaking.
Primarily you need to make sure that you have entered your external E-mail address in Plesk as the general Admin E-mail address.
You can check this by viewing the file: /var/qmail/alias/.qmail-root
cat /var/qmail/alias/.qmail-root
If you wish to receive all the server root-messages to a different E-mail address, then you can edit this file and change the existing E-mail address.
We assume your hostname is: hostname.yourdomain.tld
So from now you need to substitute this with your hostname in the following of this howto.
First you will need to tell Qmail that your hostname is a local name.
So we edit the file: /var/qmail/control/locals
nano -w /var/qmail/control/locals
And we add to this file:
localhost.hostname.yourdomain.tld
hostname.yourdomain.tld
Next we make sure that this hostnames can receive email.
So we edit: /var/qmail/control/rcpthosts
And we add like before:
localhost.hostname.yourdomain.tld
hostname.yourdomain.tld
Then we need to restart xinetd and qmail services:
service xinetd restart service qmail restart
You may check your settings with:
/var/qmail/bin/qmail-showctl | grep localhost.hostname.yourdomain.tld
You may even test it now with:
mail root@localhost.hostname.yourdomain.tld
NB: after typing your test-message, you can quit by pressing: <CTRL><D>