New Config.pm docs

 
From: "Justin J" <justin@PROTECTED>
Date: July 28th 2010

Hello Everyone,

I've gotten a few good bits of feedback on the new installer - I think it's going to help a lot of people If you haven't tried it yourself, give it a shot - it's a ton easier to setup Dada Mail with - even for me

I've been starting to edit the documentation for the Config pm file - and actually, all the documentation that refers to the, "Basic Installation" - I'm getting rid of this idea, since installing Dada Mail via the, "Basic Installation" isn't so basic and is actually a lot harder, than using the installer, so there's really no reason to truly keep it around

I'd love to get feedback about it, as well You can read the new docs here:

http://github
com/justingit/dada-mail/blob/installer/dada/DADA/Config
pm

The changes are mostly on the top, where it describes what the file it about and how to change global variables

Below is basically the changed lines:

NAME Config pm

DESCRIPTION

The Config pm file holds all the global variables in Dada Mail It should not itself be heavily edited with custom changes - such changes will be lost whenever you upgrade Use the outside config file ( dada_config) for that

How To Use This File and This Documentation

Other than the variables:

• $PROGRAM_CONFIG_FILE_DIR
• $PROGRAM_ERROR_LOG

You should not make any changes to the variables in the dada/DADA/Config pm file

Rather, use the variables and inline documentation as a guide for making custom changes to your own outside config file (called, dada_config)

How to place new variables in your outside config file

First, double-check that the variable doesn't already exist in the outside configuration file Duplicates will simply cause headaches when editing

Place new variables in your outside config file by simply copying the variable you want to set a custom variable for and pasting that variable in your outside config file

For historical reasons, the outside config file sets the config variables by simply using Perl code, instead of a configuration-specific format This may change in the future - we don't like this technique One problem with this technique, is that setting configuration variables successfully means that you will need to use strict and valid Perl code This will make things harder for a casual user of the program perform, successfully - and unfortunately

Some things to be careful of:

The variables set in the dada/DADA/Config pm file use the, ||= operator, like this:

$SOME_VARIABLE ||= 'some value'; Replace the, ||= operator with the, = operator, when placing it in the outside config file:

$SOME_VARIABLE = 'some custom value'; You may also see hashes and arrays with, unless clauses at the end:

%SOME_HASH = ( # a long list of key/value pairs ) unless keys %SOME_HASH;

or,

@SOME_ARRAY = ( # ) unless scalar @SOME_ARRAY;

Remove the entire, unless clause:

%SOME_HASH = ( # a long list of key/value pairs );

@SOME_ARRAY = ( # );

If you need to set a variable in the outside config file to '0', it may not work Instead, try setting it to '2' This is a known, and embarrassing, issue

Currently, the $PROGRAM_ERROR_LOG variable cannot be set in the outside config file - you'll need to set it in here

How to Set Up, Install and Configure Dada Mail

Complete installation instructions may be found here:

http://dadamailproject com/installation/

Dada Mail ships with an installer that will guide you through the setup and configuration of Dada Mail, write a starter outside config file and generally, get you up and running

Config Variables

$PROGRAM_CONFIG_FILE_DIR

$PROGRAM_CONFIG_FILE_DIR holds the absolute path to the, directory the outside config file, named, dada_config, can be found

By default, you'll notice that the $PROGRAM_CONFIG_FILE_DIR variable is set to, auto If this is the case, Dada Mail will attempt to look for the dada_config file in the following location:

/home/user/ dada_files/ configs An example of a complete, usable and extendable dada_config file can be found in the Dada Mail distribution at:

dada/extras/examplees/example_dada_config txt

You may also want to read the README for this example, located at:

dada/extras/examplees/example_dada_config-README txt

$PROGRAM_ERROR_LOG

If you want to set a specific location for all errors from Dada Mail to be logged, $PROGRAM_ERROR_LOG is what you want to look at

Set this variable to, An absolute path, to a location of a file you want the error log to be Sounds like a mouthful - let's break it down:

• "An absolute path" - the path to a resource on the server, from the server's perspective
 (begin geekery:)

In a Unix environment, an absolute path starts with, "/", also known as the, "root" directory and moves down, like an upside-down tree Example of some absolute paths:

    • /home/myaccount

an example of the absolute path to my home directory

    • /home/myaccount/dada_files

an example of the absolute path to where I've set the, $FILES variable to (just as example)

So, if you've set the $FILES variable correctly, you already know what absolute paths are You see? You're smarter than you thought

• "to a location of a file you want the error log to be"

So what's , "an error log"? It's just a plain text file - that's it, so set the $PROGRAM_ERROR_LOG variable to an absolute path to a plaintext file Easy enough As to, "what location"? Well, if you've set the $FILES variable to an absolute path of a directory (per directions), use that as a starting point, and just specify an exact file in that directoy - easy!

So, if I set $FILES to:

$FILES = '/home/myaccount/dada_files'; set, $PROGRAM_ERROR_LOG to:

$PROGRAM_ERROR_LOG = 'home/myaccount/dada_files/errors txt'; and you're done

Note! This WILL NOT work:

$PROGRAM_ERROR_LOG = $FILES '/errors txt'; So, don't do that

Also, you cannot set this variable in an outside configuration file ( dada_config), it has to be set in the Config pm file

Don't create the file beforehand - you won't need to It'll be created automatically for you, as long as the path you set in this variable is to a place Dada Mail can actually write to

Finally, just to clarify, the program can't automatically set a error log, since there may be problems with the program, before it's able to be fully interpreted, so we have to hard code it, that's why there's this variable

Basic Configuration Variables

$PROGRAM_ROOT_PASSWORD

The $PROGRAM_ROOT_PASSWORD is used to create new mailing lists and also may be used to log into any existing mailing list

THE $PROGRAM_ROOT_PASSWORD variable should be encrypted Instructions to do so can be found in the documentation for the, $ROOT_PASS_IS_ENCRYPTED variable

$FILES

$FILES holds the directory you want your mailing list subscribers, schedules and a few obscure files to be saved in

$MAILPROG

This variable should hold the Absolute Path of your sendmail-like program

If you don't have sendmail, this script will still work great, but you may have to fiddle around with the "$MAIL_SETTINGS" variable under the "additional settings" after the first four variables Dada Mail uses a Mail Program like Sendmail or qmail to send its messages and it needs to know where the Mail Program is to be able to use it

$PROGRAM_URL

This variable holds the URL of the mail cgi script

This is the address of the mail cgi script (not this file!), so when you're all done setting up the script, you'll have to go here to make your first list

(etc)

Cheers,

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.