Code Search for Developers
 
 
  

init.pl from AlphaMail at Krugle


Show init.pl syntax highlighted

use lib qw(ALPHAMAIL_DIRECTORY/lib);

use strict;

use ModPerl::Util (); #for CORE::GLOBAL::exit
use Apache2::AuthCookie;
use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::RequestUtil ();
use Apache2::ServerRec ();
use Apache2::ServerUtil ();
use Apache2::Connection ();
use Apache2::Log ();
use APR::Table ();
use ModPerl::Registry ();
use Apache2::Const -compile => ':common';
use APR::Const -compile => ':common';

use AlphaMail;
use AlphaMail::AddressBook;
use AlphaMail::Config;
use AlphaMail::HTMLHelper;
use AlphaMail::MailTool;
use AlphaMail::Message;
use AlphaMail::Middleware;
use AlphaMail::Preferences;
use AlphaMail::SessionUtil;
use AlphaMail::Signature;
use Apache2::SiteControl;
use Apache2::SiteControl::UserFactory;
use Email::Address;
use Email::Date;
use Encode;
use HTML::Entities;
use HTML::Parser;
use Log::Log4perl;
use MIME::Decoder;
use MIME::Entity;
use MIME::Parser;
use Text::Aspell;
# use Text::Autoformat; Not used yet
use Time::HiRes;
use Unicode::Collate;
use Unicode::IMAPUtf7;

Log::Log4perl::init("CONFIG_DIRECTORY/log4perl.conf");

# create the global config object
$HTML::Mason::Commands::config = new AlphaMail::Config("CONFIG_DIRECTORY/alphamail_config");

# Create spell checker.
$HTML::Mason::Commands::speller = new Text::Aspell;
$HTML::Mason::Commands::speller->set_option("lang", "en_US");
$HTML::Mason::Commands::speller->set_option("sug-mode", "fast");

# Create unicode collator
$HTML::Mason::Commands::sorter = new Unicode::Collate;

# Remove old sessions. This is a requirement, since the encryption key is
# changing, and any existing sessions will be unreadable.
`find SESSION_DIRECTORY -name '[0-9a-fA-F]*' -print | xargs -n 50 rm > /dev/null 2>&1`;

# Make a random key for encrypting sessions, and send it to the SiteControl
# system.
open DAT, "</dev/urandom" or die "Cannot open /dev/random for key generation";
read DAT, $Apache2::SiteControl::UserFactory::encryption_key, 80; 
close DAT;

1;




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  README
  alphamail.conf
  init.pl
  log4perl.conf