UMPL for Xmailserver 2.7
Introduction
Many Sysadmins have to solve the problem of giving customers the abilty of
creating, modifying and deleting email-users on their own. For such needs of virtual email
hosting Xmailserver is a really good choice. This article covers how to install and configure the umpl-xmail
webmail and admintool which helps to make the postmasters live easier.
umpl-xmail is intented to be used on any Linux / BSD Plattform (designed for Linux/Apache). The
code should also work on windows-servers but you will have to search for bugs on your own.
If you have questions about umpl-xmail feel free to contact me at schmidt_nospam_@waaf.net.
top
Features
After the installation you are able to use the following features (multilingual):
Root-Interface:
- creating, modifying and deleting domains incl. root/postmaster-user
- creating and deleting aliasdomains
- managing Account / Diskspace Quotas
- modifying postmaster-accounts (password)
- main server configuration
Domain-Postmaster Interface:
- creating and deleting users within the domain
- modifying users within the domain (password, forward etc.)
- statistics (MailboxSize etc.)
- creating, modifying and deleting of aliases within the domain
User Interface:
- modifying of the userdata (password, forward, finger-informationen)
- Full featured interface for POP3 incl. MIME-attachments, HTML-/TXT - Mail Changer, Reply, Forward, header-view
- interface for sending email incl. MIME-attachments
- Contactlist
- Signature
- Spamblocker
top
Software needed before starting
You have to install several components before you start. Without these software working umpl-xmail will not work.
XmailServer
Get the latest sources of xmailserver at http://www.xmailserver.org/.
I suggest using the Linux RPM:
- $ cd /usr/local/src
- $ wget http://www.xmailserver.org/xmail-1.10-1.i386.rpm
- $ rpm -i xmail-1.10-1.i386.rpm
- $ vi /etc/init.d/init.d/xmail
- Add the following for creating LogFiles and allowing maximum 100 reciepients per mail:
XMAIL_CMD_LINE="-Pl -Sr 100 -Sl -Ql -Fl -Ll"
- create links for starting/stopping Xmail on reboot:
- $ ln -fs /etc/init.d/init.d/xmail /etc/init.d/rc2.d/S99xmail
- $ ln -fs /etc/init.d/init.d/xmail /etc/init.d/rc2.d/K10xmail
- $ ln -fs /etc/init.d/init.d/xmail /etc/init.d/rc3.d/S99xmail
- $ ln -fs /etc/init.d/init.d/xmail /etc/init.d/rc3.d/K10xmail
- remove all lines from /var/MailRoot/smtprelay.tab so only clients can relay that have authenticated or poped before.
For more information about installing xmailserver try the xmailserver howto: http://www.geocities.com/xmailearn/.
MySQL
if your system has not yet got a running MySQL-Server you find instructions on the following site: http://www.mysql.com/downloads/
Apache Webserver
If your system has no webserver installed i suggest to install the Apache Linux RPM of your distribution.
PHP
Get the latest sources of PHP at http://www.php.net/downloads.php.
- $ cd /usr/local/src
- $ wget http://us2.php.net/do_download.php?download_file=php-4.2.2.tar.gz
- $ tar xfz php-4.2.2.tar.gz
- $ ln -fs php-4.2.2. php
- $ cd /usr/local/src/php
- $ ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql --with-deapi
- $ make
- $ make install
- $ rm config.cache
- $ make clean
- $ cp php.ini-dist /usr/local/lib/php.ini
- $ ln -fs /usr/local/lib/php.ini /etc/httpd/php.ini
- $ vi /etc/httpd/httpd.conf
- + AddType application/x-httpd-php .php .php3 .php4 .phtml
- + AddType application/x-httpd-php-source .phps
- Restart Apache.
top
Installing umpl-code
This is the description for first-time installation. If you want update an existing umpl-xmail installation you can go to the next point.
Get the latest sources of umpl-xmail at http://dev.waaf.net/xmail/download.html and untar it.
At the following these variables are used (Change if needed - at least the passwords!):
- MAIL_ROOT of Xmailserver is /var/MailRoot/
- DocumentRoot for www-installation is /home/umpl_xmail/
- Control-account for Xmailserver is root
- Control-account-Pw for Xmailserver is root_pw
- MySQL User for umpl-xmail is umpl_xmail
- MySQL User-Pw for umpl-xmail is umpl_xmail_pw
- MySQL Database for umpl-xmail is umpl_xmail
Xmailserver
For the communication with xmailserver you have to add an control-account. This is done by the following steps:
- Stop Xmailserver
- $ /var/MailRoot/bin/XMCrypt root_pw # (or other pw)
- copy output (crypted password, e.g. xxxxxxxxx)
- $ echo -e '"root"\t"xxxxxxxxx"\n' >> /var/MailRoot/ctrlaccounts.tab *
- $ echo -e '"0.0.0.0"\t"0.0.0.0"\t"DENY"\t1\n"127.0.0.1"\t"255.255.255.0"\t"ALLOW"\t2\n' >> /var/MailRoot/ctrl.ipmap.tab *
- Restart Xmailserver
* does require Linux Bash. (does NOT work with csh ...)
MySQL-Database
You have to add a user for mysql and create some tables (simply cut and paste!):
- $ mysql -uroot -p<your-root-pw-for-mysql>
- mysql> USE mysql;
- mysql> REPLACE INTO user (Host,User,Password) VALUES('localhost','umpl_xmail',PASSWORD('umpl_xmail_pw'));
- mysql> REPLACE INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv, Delete_priv, Create_priv,Drop_priv,Alter_priv,Index_priv) VALUES ('localhost','umpl_xmail','umpl_xmail','Y','Y','Y','Y','Y','Y','Y','Y');
- mysql> FLUSH PRIVILEGES;
- mysql> CREATE DATABASE umpl_xmail;
- mysql> USE umpl_xmail;
- mysql> CREATE TABLE kontakte (
id int(11) NOT NULL auto_increment,
user varchar(128) default NULL,
name varchar(128) default NULL,
email varchar(128) default NULL,
firma varchar(128) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
- mysql> CREATE TABLE login (
user varchar(128) default NULL,
zeit int(12) default NULL,
host varchar(128) default NULL,
sid varchar(255) default NULL,
agent varchar(128) default NULL
) TYPE=MyISAM;
- mysql> CREATE TABLE signaturen (
user varchar(128) NOT NULL default '',
inhalt text,
PRIMARY KEY (user)
) TYPE=MyISAM;
- mysql> CREATE TABLE language (
user varchar(255) NOT NULL default '',
wert char(3) default NULL,
PRIMARY KEY (user)
) TYPE=MyISAM;
- mysql> CREATE TABLE quota (
domain varchar(255) NOT NULL default '',
mailboxen int(11) default NULL,
quota int(11) default NULL,
PRIMARY KEY (domain)
) TYPE=MyISAM;
- mysql> CREATE TABLE spammers (
user varchar(128) default NULL,
addr varchar(128) default NULL
) TYPE=MyISAM;
- mysql> EXIT;
Installation of Files / Directories
I use /home/umpl_xmail as doc-root for the webpages - change it to your needs!
- $ cp -R * /home/umpl_xmail
- $ chmod 777 /home/umpl_xmail/tmp
- $ vi /home/umpl_xmail/user_data.php
- check / modify the data your needs - by default the values are okay for mysql, apache and xmail on same machine!
top
Updating umpl-code
This is the description for updating an existing umpl-xmail installation (Version 2.1 to 2.4).
Get the latest sources of umpl-xmail at http://dev.waaf.net/xmail/download.html and untar it.
Upgrading from 2.6 does not need database modifications!
At the following these variables are used (Change if needed - at least the passwords!):
- MAIL_ROOT of Xmailserver is /var/MailRoot/
- DocumentRoot for www-installation is /home/umpl_xmail/
- MySQL User for umpl-xmail is umpl_xmail
- MySQL User-Pw for umpl-xmail is umpl_xmail_pw
- MySQL Database for umpl-xmail is umpl_xmail
MySQL-Database
You have (perhaps) to create some tables (simply cut and paste!):
- $ mysql -uroot -p<your-root-pw-for-mysql>
- mysql> USE umpl_xmail;
- mysql> CREATE TABLE IF NOT EXISTS kontakte (
id int(11) NOT NULL auto_increment,
user varchar(128) default NULL,
name varchar(128) default NULL,
email varchar(128) default NULL,
firma varchar(128) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
- mysql> CREATE TABLE IF NOT EXISTS login (
user varchar(128) default NULL,
zeit int(12) default NULL,
host varchar(128) default NULL,
sid varchar(255) default NULL,
agent varchar(128) default NULL
) TYPE=MyISAM;
- mysql> CREATE TABLE IF NOT EXISTS signaturen (
user varchar(128) NOT NULL default '',
inhalt text,
PRIMARY KEY (user)
) TYPE=MyISAM;
- mysql> CREATE TABLE IF NOT EXISTS language (
user varchar(255) NOT NULL default '',
wert char(3) default NULL,
PRIMARY KEY (user)
) TYPE=MyISAM;
- mysql> CREATE TABLE IF NOT EXISTS quota (
domain varchar(255) NOT NULL default '',
mailboxen int(11) default NULL,
quota int(11) default NULL,
PRIMARY KEY (domain)
) TYPE=MyISAM;
- mysql> CREATE TABLE IF NOT EXISTS spammers (
user varchar(128) default NULL,
addr varchar(128) default NULL
) TYPE=MyISAM;
- mysql> EXIT;
Installation of Files / Directories
I use /home/umpl_xmail as doc-root for the webpages - change it to your needs!
- $ cp /home/umpl_xmail/user_data.php /tmp/aus
- $ cp -R * /home/umpl_xmail
- $ cp /tmp/aus /home/umpl_xmail/user_data.php
- $ rm /tmp/aus
- $ chmod 777 /home/umpl_xmail/tmp
top
Misc
If you have any questions or problems about umpl-xmail feel free to contact me at the following adress:
Achim Schmidt
waaf.net computing
Haster Strasse 42
DE 49191 Belm
schmidt_NOSPAM_@waaf.net
(remove _NOSPAM_)
Getting startet
After having installed umpl-xmail you can start like that:
· log in at /root using user root and the pw root_pw.
· create domain.com with pw test and a quota of 20 users and 100MB.
· log in at /index.php using user: root@domain.com and pw test.
· navigate to root-admin and you can create a user willi@domain.com with pw test2 and a quota of 10 MB
· now you can log in as user willi@domain.com with pw test2 at /index.php
· the non-root users can't access root-admin but use webmail, forwarding, etc.
Thats the system - hope you enjoy it!
Files / Directories
/ # install-dir
/ *.php # PHP-Files Enduser-Interface
/user_data.php # data for Xmail & MySQL
/root_*.php # PHP-Files Postmaster-Admin
/inc/ * # include-Files for Postmaster & Enduser-Interface
/img/ * # images
/root/ # Root-Admin
/root/ *.php # PHP-Dateien Root-Admin
/root/class* # Include-Files for Root-Interface
/root/img/ * # images
/tmp/* # tmp files used by webmail (attachements)
/howto.html # html-documentation
/README # text-documentation
/INSTALL # text-install-documentation
/LICENSE # text-gpl
License
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. You should have received a copy of the GNU General
Public License along with this program; if not, write to the
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
For more details see: http://www.gnu.org/copyleft/gpl.html
If you want to say thanks to the author you can do this by sending e.g. a picture postcard ;-)
Changelog
2002-04-19: Initial release
2002-04-21: Version 2.1
· added POP3 Client
· added Multilingual dialogs
2002-04-22: Version 2.2
· added handling of Alias Domains
2002-05-01: Version 2.3
· added Quotas for Domains (Diskspace & Mailboxes)
2002-05-17: Version 2.4
· minor bugfixes at aliasdomains and sending mail
· completly new session management
2002-08-29: Version 2.5
· added spanish dialogs
· completly new mailclient (No IMAP-Lib needed anymore)
· added spam-blocker with Senders filter
· added feature of deleting more than one message at once
· added 'register_globals = Off' compatibility
· added new documentation
2002-10-15: Version 2.6
· added italian dialogs
· some bugfixes at the mailclient (unquoting of ' and ")
· some bugfixes in postmaster-admin (you can't delete user root anymore)
· some bugfixes at the documentation
2003-02-13: Version 2.7
· added dutch dialogs
· minor bugfixes at session-management
· minor bugfixes at inbox-overview (can be ordered now)
Credits
Thanks to those people:
top
2003-02-13 Achim Schmidt
[ HowTo ]
[ Screenshots ]
[ Download ]