Professional Webmail System
@Mail Web Email System Documentation : v 3.2
The latest version of this file can be found at:
http://webbasedemail.com/docs

@Mail Installation and Configuration Guide

1 Introduction: What is @Mail?
     1.1 'HotMail' Mode
     1.2 Web Email Client Mode

2 Installing @Mail
    2.1 System Requirements
        < 1000 users
        1000 - 10 000 users
        10 000 - 50 000 users
        1 000 000 users
2.2 UNIX Installation Instructions
    2.2.1 Gathering information about your server
    2.2.2 Instructions for Tar file install
2.3 Windows Installation Instructions
2.4 Identifying the Web Server User name
2.5 Multiple Domain Name configuration
2.6 Configuring SQL Database back end

4 Configuring @Mail

5 Large user base information

6 Additional Support
    6.1 The document root of your web server
    6.2 Location of Perl
    6.3 SQL server information
    6.4 Contact Support


1 Introduction: What is @Mail?

@Mail is a total Web Email solution, allowing universal Email access to your users via their web browser. @Mail can run in two modes:

    1.1 As a 'Hotmail' Style system.

This allows users to sign-up online and instantly have access to their Email. @Mail users also have full POP access, allowing them to read and send Email via an 'Outlook' or 'Eudora' style client if they wish. Email can be stored in an SQL database for speed and scalability..


    1.2 As a POP3/IMAP Access Client.

@Mail can be used as a client for other external Email accounts. This means that you can use @Mail as a replacement for 'Outlook' style programs. This allows you to have a totally mobile (including wireless) solution for Clients.

2 Installing @Mail under UNIX

This will assist you in installing the @Mail software on your server. Installation is different for UNIX and Windows, so follow the guide for your platform. Once installed, follow through to the Configuration section to learn how to fine-tune your @Mail server.

    2.1 System Requirements

The following is a hardware requirement chart, listed per user base.
A Simultaneous request is how many users can read their inbox at the same time, directly accessing your server, each request usually only lasts seconds.

Users CPU RAM Disk Space
1,000 1 Server - Pentium II > 800mhz 256MB+ 5 GB (5MB per User)
10,000 1 Server - Pentium II > 1gz 512MB+ 50 GB (5MB per User)
50,000 2 Servers - > 2.0gz 1GB+ 250 GB+ (5MB per User)
1,000,000 See Large User Documentation    

Less than 1000 User Mail Boxes, 3 Simultaneous Requests
Pentium II 800mhz+
256MB RAM
5GB (5MB user quota)
This setup does not require installation and configuration of the SQL Database

1000 - 10 000 User Mail Boxes, 25 Simultaneous Requests
Pentium class 1Ghz
256MB RAM
50GB (5MB user quota)

10 000 - 50 000 User Mail Boxes, 100 Simultaneous Requests
Two of the Following Servers:

Pentium class 2.0Ghz
1GB RAM
The first server handles all the web requests, the second is a database server, storing and retrieving the user Email.
The Database Server must in addition have:
250GB (5MB user quota) RAID
mySQL Database Server
These two Servers should be located via the same LAN for fast connectivity

1 000 000 User Mail Boxes.
Please see Large User Base Information

Software Requirements:
Perl 5+
Perl executable web server (ISS, Apache)
Sendmail / Qmail / Postfix or Exim *
WinNT, Win2k / XP
Unix, Linux, FreeBSD, Solaris (and most other UNIX flavors)

* SMTP configuration required

    2.2 UNIX Install Instructions

This section will guide you through installation of @Mail on a UNIX platform. It is recommended you install @Mail as root.

        2.2.1 Gathering information about your server.

Before you install @Mail you will need to know the following about your server:

· Where you want to place @Mail on your WebServer
· The Web Server username
· Location of Sendmail and startup flags
· Location of Perl
· SMTP hostname
· SQL server information (optional)

        2.2.2 Instructions for tar file install

1. Gunzip / Untar atmail.tgz into your web server's document root

Find the pathname to your web servers document root to install @Mail within your document root so the @Mail directory you are creating is available via the web.

Move the @Mail tarball you've downloaded to a location within your document root.

root# mv atmail.tgz /www/

where /www is your document root.

Now move to your /www directory.

root:/# cd /www/

You will need to enter the server details for your machine, the utility will analyze your unique server setup and prompt for any configuration needed.

Untar/Uncompress atmail archive and move into the atmail directory by typing the following

root:/www# tar xfvz atmail.tgz
root:/www# cd atmail

2. Automatic Configuration

Now you can run the @Mail install utility. This program will ask you questions about your Server, and make the appropriate configuration changes.

root:/www/atmail# perl install.pl

The @Mail install.pl script will attempt to configure your server for @Mail . If required the install.pl script will modify your systems httpd.conf and sendmail.cf for @Mail.

Once the install.pl script is complete you can visit the WebAdmin of @Mail to finish the installation. Using the WebAdmin you can fine tune the installation and specify account preferences. The WebAdmin is located:

http://yourdomainname.com/atmail/webadmin/

Where yourdomainname.com is the domain-name you setup @Mail under, and atmail/ the directory you installed @Mail.

3. Manual Configuration of @Mail

If you have difficulty running the install.pl script you can install @Mail manually. The steps required to install @Mail follow:

  • Change the ownership of the @Mail directory
  • Configure your Webserver to execute @Mail
  • Configure the SMTP server
  • Visit the @Mail WebAdmin to define system settings / preferences

Change the ownership of the @Mail directory:

Correct Permissions must be set for @Mail to run on your server. Replace 'username' with your web server's username and type the following:

root:/www/atmail# chown -R username /www/atmail

Configure your WebServer to execute @Mail

Your webserver must be configured to execute .pl files as scripts. Depending on the version of your web server, the following modifications will need to be made in either httpd.conf or srm.conf. Newer versions use httpd.conf. If you are using a virtual host, make sure you scroll down and find the domain name that @Mail will be running under. If you add the following lines outside the virtual host configuration, it will be made system wide. Check with your host provider if you are unsure.

# Allow .pl files to be executed as a perl script
AddHandler cgi-script .pl

<Directory "/www/atmail"> # replace this with your @Mail directory
Options ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


<Files ~ ".pm > # Fixes security hole
order allow,deny
deny from all
</Files>

You must now restart your web server.

Configure the SMTP Server:

@Mail as a POP3/IMAP Client does not require any modification to your SMTP server.

If you use @Mail as the Email-Server (e.g Auto signup of accounts, HotMail type system) you must modify your SMTP server to deliver emails to @Mail.

@Mail supports a variety of MTA (Mail Transport Agents) to deliver emails to @Mail. Depending on your system type, the configuration will vary.

For information on how to configure your SMTP server click the relevant link below.

    2.3 Windows NT Install Instructions

Please see the Windows Installation Guide for information regarding installing @Mail for windows.

    2.4 Identifying the Web Server Account

The best way to find the user name of your web server is to read it from your httpd.conf file.

To find your httpd.conf file type:

root:/# find / -name httpd.conf

Once you find it move to it's directory

root:/# cd /dir

root:/# cat httpd.conf | grep User

You will see output similar to :

# User/Group: The name (or #number) of the user/group to run httpd as.
User nobody

This tells you that the httpd user is 'nobody'. This name is common for apache web servers.

    2.5 Multiple Domains

To configure @Mail to run over more than one domain use the WebAdmin utility in @Mail. Or consult the relevant SMTP configuration file for your system.

    2.6 Configuring SQL

If you are running more than 10 000 users you should use an SQL Database.

Via an SQL database, you can setup multiple machines to host the webemail solution for your clients. Each machine can communicate to the SQL server to retrieve messages, while serving - Allowing you to scale the webemail solution to suite your needs. We recommend using mySQL under a UNIX OS.

If using mySQL, check your mysqld startup flags include a larger max_allowed_packet . By default, mySQL supports a maximum query of 1MB. You must increase this value, otherwise large attachments will not be accepted.

Configure by running mySQL like:

/usr/local/libexec/mysqld -O max_allowed_packet=9999999

Or set max_allowed_packet in your mySQL configuration file, my.cnf

        2.6.1 Setting up the SQL Environment

Start mySQL with user root, and create a new database called 'atmail'
user:/www/atmail# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 113 to server version: 3.22.24

mysql> create database atmail;

Query OK, 1 row affected (0.06 sec)
Once your SQL database is setup, install the Perl DBI module for your database type if requested by the installation script.

See http://search.cpan.org and download the DBI module for your system and configure as per the README file. Once the Perl DBI module is loaded, install the DBD module for the type of SQL server you are using (e.g DBD::Mysql for mySQL, DBD::Oracle, etc) Once these modules are installed, @Mail will be able to communicate to your SQL server, regardless of it type.

        2.6.2: Creating the SQL tables for @Mail

@Mail has two database table structures, one normal, and one large. You should use the Large table structure if your user base is over 10 000.

@Mail stores user information in the database keyed by the first Character in the username. This means that SQL can access the needed information at a much faster rate. If you have over 10 000 users @Mail stores the information by the first and second characters.

If you are running Less than 10 000 users, use the following (replace database_name with the name of your database, e.g. atmail):

mysql -u root database_name < atmail/docs/normal.sql

If you are running greater than 10 000 users,

mysql -u root database_name < atmail/docs/large.sql

This will create all the necessary database tables.

        2.6.3: Set Database Configuration via Webadmin

Visit the Webadmin control panel and set the various database options for your OS. Via the Webadmin panel, select which SQL server you are using and provide the username/password required to login to the database server. Enter the hostname/IP address of the SQL server if it is on a different server to the @Mail Software.

        2.6.4: Validate Setup

Check your setup and configuration files, and verify the system is working by adding a new user to the system. When the user receives Email, @Mail SQL is complete

3 Configuring @Mail

Configuration of @Mail can be made directly from the Config file although the Primary Configuration Tool for @Mail is the WebAdmin. Once installed, Visit http://yourdomain.com/atmail/webadmin/ you may be prompted for a Password.

In the WebAdmin you'll find the following configuration options:

- System Configuration
- Sendmail Configuration
- Database Configuration
- Branding (Brand Specific Configuration, personalize your version of @Mail)
- User Defaults (Default Settings for new users)
- LDAP Settings
- Manage Domains
- Undeliverable (Return messages in case an email delivery fails)
- Reserved Usernames (Usernames that can't be used by users)
- Admin Password (Change the password to your Webadmin)
- @Mail Registration
- Backup @Mail
- And more...

 

4. Configuring @Mail

The @Mail configuration file is /www/atmail/libs/Atmail/Config.pm. It holds all of the configuration for @Mail. You can edit this file manually but we advice to use the WebAdmin. If you plan to manually change this file, please make a backup of it first.

 

5. Large User base Information

For information about serving 1 000 000 users, please see our case study.

6 Additional Support

    6.1 The document root of your web server

locate your httpd.conf:

root:/# locate httpd.conf

or

root:/# find / -name httpd.conf

Once you find the location of httpd.conf, cd to the directory and type the following:

cat httpd.conf | grep DocumentRoot
·
This will display the current document root.

When you type your domain name into the address bar of a web browser, you are shown the DocumentRoot of your web server.

    6.2 Location of Perl

To locate perl type the following:

root:/# which perl

This will tell you the location.

    6.3 SQL server information

You will need to know the following:

Username
Password

    6.4 Contact Support

For additional support, please visit our web site, http://webbasedemail.com
Or send us an Email : support@CalaCode.com