Install Dada Mail Manually

Manually Installing Dada Mail

First, a Word

Unless you like to or need to, it's much easier now to use the Dada Mail Installer - both these instructions and the Dada Mail installer will install and Configure Dada Mail in basically the same way.

In these directions, I'll be giving examples of shell commands you may issue to complete each step. They may need to be slightly modify to work with your particular environment. Noting too tricky, though.

Download Dada Mail at:

Either uncompress the distribution on your desktop and upload the, dada directory into your cgi-bin, or,

upload the .tar.gz distribution itself into your cgi-bin and uncompress on your hosting account (you'll need an ssh connection).

 gunzip dada-4_x_x.tar.gz; tar -xvf dada-4_x_x.tar; cd dada

Change the permissions of the, mail.cgi file to, 755:

 chmod 755 mail.cgi

Visit the, mail.cgi script in your web browser. You should see a "Welcome" screen, that also tells you that Dada Mail has not been configured.

Note the URL that you used to access the mail.cgi script. We'll be using that later.

Step #2 Create the .dada_files directory and directory hierarchy

In your home directory (preferably), create a directory called, .dada_files. In this directory, create the following directories:

You may use the following command:

 cd; mkdir .dada_files; cd .dada_files; mkdir .archives .backups \
 .configs  .lists .logs .templates .tmp

Step #3 Create the .dada_config file

A ready-to-use copy of the .dada_config file is located in the, dada/extras/examples/example_dada_config.txt file. Copy the file/contents from this file into the .dada_files/.configs directory we just set up, in a file named, .dada_config

 cd; cp public_html/cgi-bin/dada/extras/examples/example_dada_config.txt .dada_files/.configs/.dada_config

In the above command, public_html/cgi-bin/dada is the path to the dada directory, inside the cgi-bin - change to fit your environment.

Step #4 Edit the .dada_config file

To start off, the .dada_config file needs two variables changed and they are the first two variables on top of the file. They are:

  • $DIR

    Set, $DIR to the absolute path of the .dada_files directory we just set up. If you don't know the absolute path, change into your .dada_files directory, and issue the, pwd command:

     cd; cd .dada_files; pwd

    (prints, /home/example/.dada_files, for example)

    Set the $DIR variable to this, like so:

     my $DIR         = '/home/example/.dada_files';

    Set $PROGRAM_URL to the URL we used to access the, mail.cgi script in the web browser.

$PROGRAM_ROOT_PASSWORD - The Dada Mail Root Password

You'll also want to set the main, Dada Mail Root Password for Dada Mail in the .dada_config file. It's saved in the variable, $PROGRAM_ROOT_PASSWORD. There's two ways to do this:

The first is to set the, $PROGRAM_ROOT_PASSWORD variable to the Dada Mail Root Password you'd like to use:

 # Start Root Password
 $PROGRAM_ROOT_PASSWORD    = 'sneaky';
 # End Root Password

Easy enough.

The second method is to set an encrypted version of our Dada Mail Root Password. This is what we seriously recommend.

To do so, visit your Dada Mail (in your web browser, go to the URL you're setting in the $PROGRAM_URL variable) with this query string: ?f=pass_gen. You're entire URL will look like this:

if, is the URL to your Dada Mail.

Follow the instructions to encrypt your Dada Mail Root Password. You'll want to set the encrypted Dada Mail Root Password in the, $PROGRAM_ROOT_PASSWORD variable as well as setting the, $ROOT_PASS_IS_ENCRYPTED to, 1:

 # Start Root Password
 # End Root Password

MySQL Backend

This step is really optional, but we do encourage you to use the MySQL backend. It involves more editing of the .dada_config file - easy stuff.

You'll need to remove the following lines in your .dada_config file:

 # start cut for SQL Backend


 # end cut for SQL Backend

This will enable the SQL configuration

Next, create a new SQL database, specifically for Dada Mail. In these instructions, we're just going to use MySQL, but there are other choices.

Note the server, database, username and password you've set up.

Then, create the necessary tables in that database. The schema needed will be in the, dada/extras/SQL directory. The one specific for Dada Mail is called,


Now, just fill out the variables in the .dada_config file. Here's the lines you're interested in:

        # May just be, "localhost" 
        dbserver         => 'localhost',
        database         => 'dadamail',
        # MySQL:      3306
        # PostgreSQL: 5432      
        port             => '3306',
        # MySQL:      mysql 
        # PostgreSQL: Pg
        # SQLite:     SQLite
        dbtype           => 'mysql',  
        user             => 'dadauser',          
        pass             => 'dadapass',

For my database, I set the name as, "dadamail" the user as, "dadauser" and the password as, "dadapass". You should be able to spot them, in the code above.

All Set!

We are done setting up and configuring the .dada_config file -

but do feel free to add to this outside configuration file whenever you like - most any variable located in the file can be added to this file. Any variable you do add, overrides the value you set in the itself. Think of the file as where the default configuration of Dada Mail lives and your outside configuration file (.dada_config) is where you'll want to set your customizations to make Dada Mail work with your own setup.

Step #5 Setting up the file

The only thing the file needs to know, is the directory the .dada_config file lives in. If you set the $DIR variable inside the .dada_config file to,


the directory it lives in will be:


Open up the file that's located in the dada/DADA directory and set the variable named, $PROGRAM_CONFIG_FILE_DIR to the directory the outside config file lives in, like so:

 $PROGRAM_CONFIG_FILE_DIR = '/home/example/.dada_files/.configs';

Save your changes.

Visit the, mail.cgi script in your web browser again. If everything worked correctly, you should see the "Congrats" screen. All set!