Code Search for Developers
 
 
  

IMAPAuth.pm from AlphaMail at Krugle


Show IMAPAuth.pm syntax highlighted

package IMAPAuth;

use 5.008;
use strict;
use warnings;
use Carp;
use AlphaMail::Middleware;
use AlphaMail::Config;

sub check_credentials
{
   my $r = shift;
   my $user = shift;
   my $password = shift;
   my $mx = shift;
   my $c;
   my $config = new AlphaMail::Config($r->dir_config('AlphamailParameters'));
   my $imaps = $config->getIMAPServers;

   my $server = $imaps->{$mx}{server} . ":" . $imaps->{$mx}{port};
   eval {
      $c = new AlphaMail::Middleware($server, $user, $password, $config);
   };
   if($@) {
      $r->log_error("Login failed for $user. Auth failed: $@");
      return 0;
   }

   return 1;
}

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

  AlphaMail/
    AddressBook.pm
    AdminAccessRule.pm
    AdminUsers.pm
    Config.pm
    Filter.pm
    HTMLHelper.pm
    MailTool.pm
    Message.pm
    Middleware.pm
    Preferences.pm
    Quota.pm
    RequestHandler.pm
    SessionUtil.pm
    Signature.pm
  Apache2/
    SiteControl/
      GrantAllRule.pm
      ManagerFactory.pm
      PermissionManager.pm
      Rule.pm
      User.pm
      UserFactory.pm
    SiteControl.pm
  Unicode/
    IMAPUtf7.pm
  AlphaMail.pm
  IMAPAuth.pm
  ManagerFactory.pm