Unable to add Domain Alias. Mandatory option --ip4-addr or ip6-addr is not specified

Created:

2016-11-16 13:23:15 UTC

Modified:

2017-08-16 17:14:05 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to add Domain Alias. Mandatory option --ip4-addr or ip6-addr is not specified

Applicable to:

  • Plesk 11.x for Linux

Symptoms

The following error occurs in Plesk while trying to create domain alias:

     ERROR: mail_Exception_ManagerExecution
mailmng failed: Fatal error: plesk::mail::postfix::mailmng_commands::MissingMandatoryOption(mandatory option "--ip4-addr or ip6-addr" is not specified)

Cause

The issue is caused by database inconsistency.

Resolution

  1. Check if ipCollectionId for affected domain is equals to NULL :

    # plesk db 'select d.name, ds.id,dom_id,type,ipCollectionId  from DomainServices ds LEFT JOIN domains d on ds.dom_id=d.id where d.name="domain.tld";'

    +------------+-----+--------+------+----------------+
    | name | id | dom_id | type | ipCollectionId |
    +------------+-----+--------+------+----------------+
    | domain.tld | 169 | 84 | mail | NULL | <== Mail is not assigned to an IP address.
    | domain.tld | 170 | 84 | web | 170 |
    +------------+-----+--------+------+----------------+

    If ipCollectionId for mail type is NULL you can recreate mail handlers as it described in Knowledge Base article

    • If it does not fix the issue, add an IP address into the DomainServices table:

      1. Login to mysql:

        # plesk db
      2. Set the ip address for mail service of the domain:

        mysql> set @ip = ("203.0.113.2");
      3. Execute the following mysql commands to fix the issue.

        mysql> set @ipid = (select id from IP_Addresses where ip_address=(@ip));
        mysql> set @max = (select max(ipCollectionId) from IpAddressesCollections)+1;
        mysql> insert into IpAddressesCollections values (@max,@ipid);
        mysql> update DomainServices set ipCollectionId=@max where id=**value of id from issued string in Cause section**;
      4. Check if ipCollectionId was added:

        # plesk db 'select d.name, ds.id,dom_id,type,ipCollectionId  from DomainServices ds LEFT JOIN domains d on ds.dom_id=d.id where d.name="domain.tld";'

        +------------+-----+--------+------+----------------+
        | name | id | dom_id | type | ipCollectionId |
        +------------+-----+--------+------+----------------+
        | domain.tld | 169 | 84 | mail | 171 | <<== Mail is not assigned to an IP address.
        | domain.tld | 170 | 84 | web | 170 |
        +------------+-----+--------+------+----------------+
  2. If there is no NULL output in ipCollectionId like below:

    # plesk db 'select d.name, ds.id,dom_id,type,ipCollectionId  from DomainServices ds LEFT JOIN domains d on ds.dom_id=d.id where d.name="domain.tld";'

    +------------+-----+--------+------+----------------+
    | name | id | dom_id | type | ipCollectionId |
    +------------+-----+--------+------+----------------+
    | domain.tld | 169 | 84 | mail | 169 |
    | domain.tld | 170 | 84 | web | 170 |
    +------------+-----+--------+------+----------------+
    1. Check if records persist in IpAddressesCollections table:

      # plesk db 'select * from IpAddressesCollections where ipCollectionId = 170;'

      +----------------+-------------+
      | ipCollectionId | ipAddressId |
      +----------------+-------------+
      | 170 | 1 |
      +----------------+-------------+

      # plesk db 'select * from IpAddressesCollections where ipCollectionId = 169;'
      Empty set (0.00 sec)
    2. You can manually add missing record using ipAddressId from previous query:

      # plesk db 'insert into IpAddressesCollections values (169, 1);'
Have more questions? Submit a request
Please sign in to leave a comment.