[rt-users] Mapping attributes.

"Fábio M. Catunda" fcatunda at contactnet.com.br
Mon Feb 18 17:35:52 EST 2008


Well, my ultra-mega User_Local.pm realy does not work, here it is:

no warnings qw(redefine);

sub Create {
        my $Email = $$args{'Name'};
        use Net::LDAP;
        $ldap = Net::LDAP->new( '<ldap host>' ) or die "$@";
        $mesg = $ldap->bind ;
        $mesg = $ldap->search( attrs  => ['cn'],
                       scope  => "sub",
                       base   => "ou=Users,dc=contactnet,dc=com,dc=br",
                       filter => "(&(mail=$Email))" );
        $mesg->code && die $mesg->error;
        if ($mesg->entries){
                $res = $mesg->entry(0);
                $res = $res->get_value("cn", 1);
                $$args{'Name'} = $res;
        }
        $mesg = $ldap->unbind;
        return 1;

};

1;

And here it goes some logging:

Mon Feb 18 22:30:23 2008] [crit]: User  'testert at contactnet.com.br' 
could not be loaded in the mail gateway 
(/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:241)

Stack trace:
        RT::Interface::Email::MailError() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:328
        RT::Interface::Email::CreateUser() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email/Auth/MailFrom.pm:172
        RT::Interface::Email::Auth::MailFrom::GetCurrentUser() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:627
        RT::Interface::Email::Gateway() called at 
/usr/share/request-tracker3.6/html/REST/1.0/NoAuth/mail-gateway:59
        HTML::Mason::Commands::__ANON__() called at 
/usr/share/perl5/HTML/Mason/Component.pm:135
        HTML::Mason::Component::run() called at 
/usr/share/perl5/HTML/Mason/Request.pm:1251
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:1246
        HTML::Mason::Request::comp() called at 
/usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:412
        HTML::Mason::Request::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:165
        HTML::Mason::Request::ApacheHandler::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:832
        HTML::Mason::ApacheHandler::handle_request() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        (eval)() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        RT::Mason::handler() called at -e:0
        (eval)() called at -e:0
[Mon Feb 18 22:30:23 2008] [error]: RT could not load a valid user, and 
RT's configuration does not allow
for the creation of a new user for this email (testert at contactnet.com.br).

You might need to grant 'Everyone' the right 'CreateTicket' for the
queue Suporte. (/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:241)

Stack trace:
        RT::Interface::Email::MailError() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:846
        RT::Interface::Email::_NoAuthorizedUserFound() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:652
        RT::Interface::Email::Gateway() called at 
/usr/share/request-tracker3.6/html/REST/1.0/NoAuth/mail-gateway:59
        HTML::Mason::Commands::__ANON__() called at 
/usr/share/perl5/HTML/Mason/Component.pm:135
        HTML::Mason::Component::run() called at 
/usr/share/perl5/HTML/Mason/Request.pm:1251
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:1246
        HTML::Mason::Request::comp() called at 
/usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:412
        HTML::Mason::Request::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:165
        HTML::Mason::Request::ApacheHandler::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:832
        HTML::Mason::ApacheHandler::handle_request() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        (eval)() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        RT::Mason::handler() called at -e:0
        (eval)() called at -e:0
[Mon Feb 18 22:30:23 2008] [error]: RT could not load a valid user, and 
RT's configuration does not allow
for the creation of a new user for your email. 
(/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:241)

Stack trace:
        RT::Interface::Email::MailError() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:859
        RT::Interface::Email::_NoAuthorizedUserFound() called at 
/usr/share/request-tracker3.6/lib/RT/Interface/Email.pm:652
        RT::Interface::Email::Gateway() called at 
/usr/share/request-tracker3.6/html/REST/1.0/NoAuth/mail-gateway:59
        HTML::Mason::Commands::__ANON__() called at 
/usr/share/perl5/HTML/Mason/Component.pm:135
        HTML::Mason::Component::run() called at 
/usr/share/perl5/HTML/Mason/Request.pm:1251
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:1246
        HTML::Mason::Request::comp() called at 
/usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:412
        HTML::Mason::Request::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:165
        HTML::Mason::Request::ApacheHandler::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:832
        HTML::Mason::ApacheHandler::handle_request() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        (eval)() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        RT::Mason::handler() called at -e:0
        (eval)() called at -e:0
[Mon Feb 18 22:30:23 2008] [error]: Could not record email: Could not 
load a valid user 
(/usr/share/request-tracker3.6/html/REST/1.0/NoAuth/mail-gateway:73)

Stack trace:
        HTML::Mason::Commands::__ANON__() called at 
/usr/share/perl5/HTML/Mason/Component.pm:135
        HTML::Mason::Component::run() called at 
/usr/share/perl5/HTML/Mason/Request.pm:1251
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:1246
        HTML::Mason::Request::comp() called at 
/usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:460
        (eval)() called at /usr/share/perl5/HTML/Mason/Request.pm:412
        HTML::Mason::Request::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:165
        HTML::Mason::Request::ApacheHandler::exec() called at 
/usr/share/perl5/HTML/Mason/ApacheHandler.pm:832
        HTML::Mason::ApacheHandler::handle_request() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        (eval)() called at 
/usr/share/request-tracker3.6/libexec/webmux.pl:123
        RT::Mason::handler() called at -e:0
        (eval)() called at -e:0


Thanks for any help!




More information about the rt-users mailing list