public DistributionList createDistributionList(String listAddress, Map listAttrs) throws ServiceException {
public DistributionList createDistributionList(String listAddress, Map<String, Object> listAttrs) throws ServiceException {
    public DistributionList createDistributionList(String listAddress, Map listAttrs) throws ServiceException {        listAddress = listAddress.toLowerCase().trim();        HashMap attrManagerContext = new HashMap();        AttributeManager.getInstance().preModify(listAttrs, null, attrManagerContext, true, true);        DirContext ctxt = null;        try {            ctxt = LdapUtil.getDirContext(true);            String parts[] = listAddress.split("@");            if (parts.length != 2)                throw ServiceException.INVALID_REQUEST("must be valid list address: " + listAddress, null);            String list = parts[0];            String domain = parts[1];            Domain d = getDomainByName(domain, ctxt);            if (d == null)                throw AccountServiceException.NO_SUCH_DOMAIN(domain);            String domainType = d.getAttr(Provisioning.A_zimbraDomainType, Provisioning.DOMAIN_TYPE_LOCAL);            if (!domainType.equals(Provisioning.DOMAIN_TYPE_LOCAL))                throw ServiceException.INVALID_REQUEST("domain type must be local", null);            Attributes attrs = new BasicAttributes(true);            LdapUtil.mapToAttrs(listAttrs, attrs);            Attribute oc = LdapUtil.addAttr(attrs, A_objectClass, "zimbraDistributionList");            oc.add("zimbraMailRecipient");            String zimbraIdStr = LdapUtil.generateUUID();            attrs.put(A_zimbraId, zimbraIdStr);            attrs.put(A_zimbraMailAlias, listAddress);            attrs.put(A_mail, listAddress);            // by default a distribution list is always created enabled            if (attrs.get(Provisioning.A_zimbraMailStatus) == null) {                attrs.put(A_zimbraMailStatus, MAIL_STATUS_ENABLED);            }            String dn = emailToDN(list, domain);            createSubcontext(ctxt, dn, attrs, "createDistributionList");            DistributionList dlist = getDistributionListById(zimbraIdStr, ctxt);            AttributeManager.getInstance().postModify(listAttrs, dlist, attrManagerContext, true);            return dlist;        } catch (NameAlreadyBoundException nabe) {            throw AccountServiceException.DISTRIBUTION_LIST_EXISTS(listAddress);        } finally {            LdapUtil.closeContext(ctxt);        }    }