Symptoms

APS task fails while trying to create a new Open-Xchange mailbox for a new Service User in the Hosting CP:

Failed to create OX mail account context=1 'user@domain.tld': A mapping with login info "user@domain.tld||user@domain.tld" already exists in the system!

Cause

Such user already exists in OX system, either added manually or remained as a result of failed/canceled OA tasks in the past.

Resolution

  1. Login to Open-Xchange application server.

  2. List contexts:

    Note: oxadminmaster password can be retrieved from global settings of 'Open-Xchange' application resource type in OA CP.

    [root@OX ~]# /opt/open-xchange/sbin/listcontext -A oxadminmaster -P ***
    cid fid fname       enabled  qmax qused name                    lmappings                           ...
      5   1 5_ctx_store true        0     0 5.Company_Name admin1||admin1,user@domain.tld||user@domain.tld        
    ...
    
  3. List users for the context ID obtained on the previous step:

    Note: context admin credentials can be retrieved from the settings of the corresponding application instance.

    [root@OX ~]# /opt/open-xchange/sbin/listuser -c 5 -A admin1 -P ***
    Id Name                   Displayname                Email
     2 admin1                 Admin                     admin1@domain.tld
    16 user@domain.tld        UserName                  user@domain.tld
    
  4. Delete the user from the context:

    [root@OX ~]# /opt/open-xchange/sbin/deleteuser -c 5 -i 16 -A admin1 -P ***
    user 16 in context 5 deleted
    
  5. Delete the user mappings from the context:

    [root@OX ~]# /opt/open-xchange/sbin/changecontext -A oxadminmaster -P *** -c 5 --removemapping "user@domain.tld||user@domain.tld"
    context 5 changed  
    

Internal content