Overview
This report will speak about configuring Postfix, Squirrelmail with Change Password Plug-in, Dovecot, Virtulmin to give support for virtual domains, Apache and Imapcopy. This report consists from many sections:
1- Configuring Postfix
2- Configuring Squirrelmail with Change Password Plug-in
3- Configuring Virtualmiin
4- Configuring Apache
5- Imapcopy for fetching emails from old mail system
If you need your email system to support antivirus and antispam, please refer to my previous report in this issue. Also detailed information for configuration of apache can be found in my previous report in this issue.
Section 3: Configuring Virtualmin
1-Download webmin rpm from www.webmin.com
2-Install the virtualmin modele
3- Make sure that mysql, mysql-server and mysql-client rpms installed and restart mysqld service
4- Apache must be configured for Virtual Hosting, and must be capable of using suexec to execute user CGI programs. The first can be accomplished from within Webmin by browsing to the Apache:Networking and Addresses module, and entering either a local address or selecting the Include all addresses option. Then click Save. This will add a line like the following to the httpd.conf file: NameVirtualHost 213.244.82.157
Next, Apache needs to be able to run CGI scripts on behalf of users using a suexec mechanism. In version 2.0, you'll need to load mod_suexec, using a line like the following: LoadModule suexec_module modules/mod_suexec.so
5- Postfix on most systems is very nearly ready for use as the mail server for the Virtual Servers module. The only thing missing is the configuration for a virtual mapping database and, if using quotas, moving the spool directory to the same partition that user data lives on. The first can be added easily using Webmin. Browse to Postfix:Virtual Domains. Enter a type of database, and a filename for the virtual map database into the Domain mapping lookup tables field. Generally, this will be something along the lines of hash:/etc/postfix/virtual.
6- BIND requires no explicit configuration for the Virtual Servers module, but it must be up and running, and configured for use with Webmin.
7-
Enable Disk Quota on the mount /home
The first step to enabling quotas is to turn them on in the /etc/fstab configuration file. You can do this in Webmin by browsing to the System:Disk and Network Filesystems module. Then click on the /home partition link. Finally, locate the Use Quotas? Option. Then you can go to System Quota in webmin module and choose the quota limit for each user or group in /home.
You can also make this change manually, by editing the /etc/fstab in your favorite editor, and modifying the /home mount point entry to look something like this: /dev/hda2 /home ext3 defaults,usrquota,grpquota 1 1
The important bit of the above example is the addition of the usrquota and grpquota directives. These two items enable both user and group quotas.
After adding quota support to your fstab, you'll need to remount the filesystem, or reboot the system, to make the changes take effect.
Linux filesystem quotas store the disk usage data in files in the root of the filesystem being managed. The files are named quota.user and quota.group. These files must be manually created before quotas can be enabled for the first time. So use touch to create each file: # touch /home/quota.user# touch /home/quota.group
The final step in enabling quotas is to run the quotacheck utility to add initial usage values to the quota files. To do this, simply run the following command: # quotacheck -vug /home
To test to be sure your quotas are actually enabled, you can use the repquota utility to see what the current quota usage looks like.# repquota /home
8- Go to webmin virtualmin module by going to http://localhost:10000/virtual-server/
9- Try to correct any errs that appears with the initial configuration of virtualmin
10- Add new virtual domain servers from the graphical interface
I added 2 domains
a- mtit.gov.ps, administrative password: password
b-moh.gov.ps, administrative password: password
That will create 2 users mtit and moh, with 2 websites where their documents folders in /home/mtit/public_html, /home/moh/public_html
Also that will create some records in the bind server, i.e under mtit.gov.ps it will create
mtit.gov.ps, mail.mtit.gov.ps,
www.mtit,gov.ps, ftp.mtit.gov.ps records all with host ip address 213.244.82.157.
10 Add users under each virtual server
For the mtit.gov.ps domain by default will be created a user account mtit with email address
[email protected] and home directory /home/mtit/
For the moh.gov.ps domain by default will be created a user account moh with mail address
[email protected] and home directory /home/moh/
Under mtit.gov.ps I created with virtualmin module a user hedaya. Hedaya will have mail address
[email protected] and a system user account hedaya.mtit and home folder at /home/mtit/homes/hedaya.mtit
Under moh.gov.ps I created with virtualmin users ameera, laila.
Ameera will have mail address
[email protected] and a system user account ameera.moh with its home folder at /home/mtit/homes/ameera.moh.
Laila will have mail address
[email protected] and a system user account laila.moh and its home folder at /home/mtit/homes/laila.moh
11 The previous operation created the following changes in the virtual file
/etc/postfix/virtual
[email protected] mtit
mtit.gov.ps mtit.gov.ps
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] moh
moh.gov.ps moh.gov.ps
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] hedaya.mtit
[email protected] ameera.moh
[email protected] laila.moh
12- Check proper configuration of the default web site postfix.gov.ps. Now go to http://postfix.gov.ps and from squirrel mail you can send emails when logged on as hedaya.mtit logon to
[email protected]. Or test manually
telnet localhost 25
mail from:
[email protected] rcpt to:
[email protected] data
hi in my test from
[email protected] .
Quit
telnet localhost 110
user ameera.moh
pass password
retr (message no )
quit