Configure a Dedicated Server with Webmin

Part 15 - Usermin

01-Introduction - 02-Installing Webmin - 03-Configure DNS - 04-Assign Nameservers - 05-Configure SFTP - 06-Setup Web server - 07-Let's Encrypt - 08-Setup Perl/CGI PHP - 09-Manage MySQL - 10-Setup Email server - 11-Setup SASL - 12-Setup Email accounts - 13-Email process - 14-Email antivirus - [[ 15-Usermin ]] - 16-Extras

Webmin allows at the administrator to read all users mails by clicking over Servers > Read User Mail.
This is useful if you need only one user for your dedicated server but this is not always the case.
Some users need to have limited access of the server in order to see their mails and modify their databases.
Usermin is Webmin for users.
As administrator of Webmin you can enable Usermin for your users.
A user using Usermin can read mail, use spamassassin, manage databases and more.
In this ebook we will focus on how our users can have web mail other than IMAP access that we have already seen before.

Usermin installation

Log in via PuTTY and install Usermin for Webmin.

yum -y install http://prdownloads.sourceforge.net/webadmin/usermin-1.701-1.noarch.rpm


Usermin configuration

Go to Webmin interface press "Refresh Modules" from the main menu.
Navigate at Webmin > Usermin Configuration.
At the bottom of the "Usermin Configuration" page press "Start Usermin" button
Also select "Yes" and press the "Start at boot time" button.
usermin start

Always from Webmin > Usermin Configuration press the "User Interface" icon
Fill the "User Interface" form like this:

Hostname to display in Usermin: Hostname from URL
After login, always go to module: Read Mail

usermin user interface

Hit the "Save" button.

Navigate at Webmin > Usermin Configuration and click over "Usermin Module Configuration" icon this time.
Under "Usermin Module Configuration" page click over "Read Mail" link.
Fill the "Configure Module" for read email like this:

Mail storage format for Inbox: Qmail style directory (Maildir)
Sendmail mail file location: /var/spool/postfix
Qmail or MH directory in home directory: Maildir
Under "User From addresses", Default hostname for From: addresses, From URL

usermin read email configuration module
Hit the "Save" button.

From Webmin > Usermin Configuration click now over "Available Modules" icon.
We have to select which modules we want our users to use.
Check :

Procmail Mail Filter
SpamAssassin Mail Filter
Change Language
Mail Forwarding and Replies
Change Password
Read Mail

usermin availlable modules
Hit the "Save" button.

Navigating at Webmin > Usermin Configuration click over the "Allowed Users and Groups" icon.
From this page you can choose which users can use Usermin.
In our case we will leave everything as is since we want all of our users to be able to use Usermin.
usermin allowed users and groups

Go to Webmin > Usermin Configuration and click over the "Ports and Addresses" icon.

Listen on port: Change the 20000 port to something else ex: 20002 for security reasons and click the "Save" button.

usermin ports

Test your configuration by going to:

https://111.111.111.111:20002 or
https://www.website1.com:20002

Each user by logging in should be able to see his own web email.
The above URLs are complicated for the common user so let's simplify them.

Go to Servers > Apache Webserver
From the "Existing virtual hosts" list select website1.com Port 80.
Click over the icon "Aliases and Redirects"
At "Aliases and Redirects" page do:

URL redirects:
From /mail To https://www.website1.com:20002

apache aliases for web email users

Click the "Save" button and hit the "Apply Changes" link from the top right of the page.

Do the same procedure for the virtual host website1.com Port 443.

By doing this procedure each user can log in using:

http://www.website1.com/mail or
https://www.website1.com/mail

Notice that at both cases the users are redirected to https://www.website1.com:20002

The users might find the web interface a little bit awkward.
Specially if the user wants to login at his web email using a smartphone.
This problem can be solved by using themes.
I recommend to use themes only in Usermin and not in Webmin.
The default theme for Usermin and Webmin is called "Grey framed theme"
Let's change the theme for Usermin.
I suggest downloading BWTheme from theme.winfuture.it
Another option is the Authentic theme from github.com/qooob/authentic-theme
The Authentic theme is slower than BWTheme that's why i prefer BWTheme over Authentic.
Download the theme locally.

Navigate at Webmin > Usermin Configuration and click over the "Usermin Themes" icon.
Press the "Install theme" tab.
Select the "From uploaded file" and click the "Browse" button.
Load your theme ex : bwtheme.wbt.gz
change usermin theme
Click the "Install Theme" button and wait.

Once the theme is uploaded click over "Change theme" tab, select "BWTheme" from the drop down list and click the "Change" button.
change usermin theme

Webmin has built-in option to compress static files, this helps themes to load faster.
It's possible to enable this feature by going to:
Webmin > Webmin Configuration and by clicking at "Web Server Options" icon.
Set "Gzip compress static files?" option to Use pre-compressed file and compress dynamically.
webmin apache enable gzip

Click the "Save" button.

Notice how nice is this theme for the user by going at http://www.website1.com/mail:
test usermin theme login
test usermin theme main page

Upgrade Usermin

The administrator of Webmin can also upgrade Usermin.
Navigate at Webmin > Usermin Configuration and click over the "Upgrade Usermin" icon.
Select Latest version from www.usermin.com and click the "Upgrade Usermin" button.
usermin-upgrade

In the last chapter we will add some extra features at our server.


01-Introduction - 02-Installing Webmin - 03-Configure DNS - 04-Assign Nameservers - 05-Configure SFTP - 06-Setup Web server - 07-Let's Encrypt - 08-Setup Perl/CGI PHP - 09-Manage MySQL - 10-Setup Email server - 11-Setup SASL - 12-Setup Email accounts - 13-Email process - 14-Email antivirus - [[ 15-Usermin ]] - 16-Extras


Copyright © TrustFm.net 1998-2024 - Made by TrustFm - All Rights Reserved Worldwide