Fetch mail problem

Moderator: crythias

Locked
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Fetch mail problem

Post by iztok »

I have the following error while trying to fetch mail (Admin, Mail Account Managment) :

Can't use string ("userPrincipalName") as an ARRAY ref while "strict refs" in use at /opt/otrs//Kernel/System/CustomerUser/LDAP.pm line 303.

Any possible solution?

Thanks in advance!
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Fetch mail problem

Post by iztok »

bump :)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Fetch mail problem

Post by crythias »

Sounds like it *could* be something to do with your Map in Config.pm.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Fetch mail problem

Post by iztok »

This is a config for Map in Config.pm

Code: Select all

 Map => [
      [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
      [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
      [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
      [ 'UserEmail', 'Email', 'userPrincipalName', 1, 1, 'var' ],
      [ 'UserCustomerID', 'CustomerID', 'userPrincipalName', 0, 1, 'var' ],
    ],
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Fetch mail problem

Post by crythias »

yep. That makes sense. userPrincipalName may not be seen as an email address.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Fetch mail problem

Post by iztok »

I've changed it to this:

Code: Select all

 Map => [
      [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
      [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
      [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
      [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
      [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    ],
And it still gives this error:

Can't use string ("userPrincipalName") as an ARRAY ref while "strict refs" in use at /opt/otrs//Kernel/System/CustomerUser/LDAP.pm line 303.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Fetch mail problem

Post by crythias »

You *might* need to restart apache after making that change.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Fetch mail problem

Post by iztok »

I did that, ofcourse. And it still isn't working. Otherwise I wouldn't bug you anymore :-)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Fetch mail problem

Post by crythias »

If it's still bugging you about userPrincipalName and it's nowhere in Config.pm, ... what OS, version, etc? (read my sig)
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Fetch mail problem

Post by iztok »

Had to change this complete series:

Code: Select all

  CustomerKey => 'sAMAccountName',
    CustomerID => 'mail',
    CustomerUserListFields => ['displayName', 'mail'],
    CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
    CustomerUserPostMasterSearchFields => ['mail'],
    CustomerUserNameFields => ['givenName', 'sn'],
    #the following must map to valid fields in your AD (givenname,sn,sAMAccountName,...)
    Map => [
      [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
      [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
      [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
      [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
      [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
    ],
  };
And now it appears to be working. Appreciate your help!
Locked