create valid mailbox id on hyphen in localpart
This commit is contained in:
parent
63201377f2
commit
29f13cf0ca
@ -45,12 +45,14 @@ public class MailboxDAO {
|
||||
}
|
||||
|
||||
private String getMailbox(String pac, String localpart) throws IOException, XmlRpcException, MailboxNotFound {
|
||||
final String mailboxPostfix = localpart.replace('-', '_');
|
||||
final String mailboxIdentifier = pac + "-" + mailboxPostfix;
|
||||
final List<Serializable> xmlRpcParamsList = new ArrayList<Serializable>();
|
||||
xmlRpcParamsList.add(pac);
|
||||
xmlRpcParamsList.add(ticketBox.getTicket());
|
||||
final HashMap<String, Serializable> whereParamsMap = new HashMap<String, Serializable>();
|
||||
xmlRpcParamsList.add(whereParamsMap);
|
||||
whereParamsMap.put("name", pac + "-" + localpart);
|
||||
whereParamsMap.put("name", mailboxIdentifier);
|
||||
final Object[] rpcResult = (Object[])rpcClient.execute("user.search", xmlRpcParamsList);
|
||||
if (rpcResult.length == 1) {
|
||||
@SuppressWarnings("unchecked")
|
||||
|
Loading…
Reference in New Issue
Block a user