Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-2010, 03:12 AM
New Member
 
Posts: 4
Unhappy Upgrade from 5.0.18 to 6.0.6.1 broke my custom authentication

Fortunately this is in a test environment . . . am I happy I have a test environment

We have a custom authentication installed in lib/ext/

I was happy to see that it had not disappeared during the upgrade, but it doesn't work any more. It calls com.zimbra.cs.account.Account.getAliases() to get a String[] containing the account aliases. That method does not exist any more.

I really do need to obtain the list of e-mails, either the aliases or all the addresses coming into the account, but definitely excluding Child Mailboxes. I use a regexp to extract one that is in a specific hard-coded domain, and I use that for the authentication.

I don't quite see what I should use as a replacement. getAllIdentities looked promising, but I couldn't easily see how to extract the list of e-mail adresses, let alone how to be certain I don't get Child Mailboxes along. I'd probably have to spend more hours poring through the code, while I hope an experienced Zimbra developer might be able to type in a reply from memory!

Thank you for any help.

Last edited by Loco; 05-19-2010 at 08:58 AM.. Reason: added text
Reply With Quote
  #2 (permalink)  
Old 05-19-2010, 09:29 PM
Zimbra Employee
 
Posts: 70
Default

Try ZAttrAccount.getMailAlias().
Reply With Quote
  #3 (permalink)  
Old 05-20-2010, 09:12 AM
New Member
 
Posts: 4
Smile

Quote:
Originally Posted by vmahajan View Post
Try ZAttrAccount.getMailAlias().
I'd try but I have an Account and I haven't tried getting a ZAttrAccount from that. My v5 code is

public void authenticate(Account acct, String password,
Map<String, Object> context, List<String> args) throws Exception {
String[] aliases = acct.getAliases();

Another Zimbra employee suggested

String[] aliases = acct.getMultiAttr(Provisioning.A_zimbraMailAlias);

so since that's a drop-in I'll try that first. Thank you both, I'll tell you how it works out.
Reply With Quote
  #4 (permalink)  
Old 01-11-2011, 01:39 AM
New Member
 
Posts: 4
Default

Quote:
Originally Posted by Loco View Post
String[] aliases = acct.getMultiAttr(Provisioning.A_zimbraMailAlias);
I'll try that first. Thank you both, I'll tell you how it works out.
Of course (since I didn't follow up) it worked perfectly
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.