Starting on October 19, 2021, we will enable single-sign-on for our Plesk Support Center to provide a seamless login/account experience. This implies that you’ll be able to use a single account across any of our web-facing properties.
To be prepared for this change and to avoid the need to register during your next ticket submission after the change, we encourage you to create an account here before October 19 using the same email address as your current Zendesk login (support account). It’s essential that you use the same email address on our support center to ensure that your tickets stay attached to the same account. You will continue to use ZenDesk authentication until we switch over to single-sign-on on October 19th.

Domain or mail account creation error: mailmng-outgoing failed, domain_id may not be NULL

Follow

Comments

8 comments

  • Avatar
    Dan Heitbohmer

    Hi Yulia,

    The domains are all set to "No web hosting" in the Plesk panel.

    After running the script, I receive the following errors (I have changed the domain names):

    root@psk1:/mailpatch# ./kb213371469.sh /affected_domains.txt
    ========================================================
    Domain: domain1.com            ipCollectionId: 71                   ipAddressId:
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    psa.IpAddressesCollections table for domain1.com has been updated

    ========================================================
    Domain: domain2.com            ipCollectionId: 86                   ipAddressId:
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    psa.IpAddressesCollections table for domain2.com has been updated

    ========================================================
    Domain: domain3.com            ipCollectionId: 76                   ipAddressId:
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    psa.IpAddressesCollections table for domain3.com has been updated

    ========================================================
    Domain: domain4.com            ipCollectionId: 176                   ipAddressId:
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    psa.IpAddressesCollections table for domain4.com has been updated

    psa.IpAddressesCollections table for all domains has been updated

    I would appreciate any assistance.

    0
    Comment actions Permalink
  • Avatar
    Robert Asilbekov

    @Dan Heitbohmer

    The script supposes that domains have a web hosting enabled and IP for the web hosting is configured properly. As it updating 'mail' service by using IP address information configured for web hosting. That's why it could not help you. If all domains on your server are using the same IP address, you may explicitly set actual id of IP address from the psa database instead of "$ipaid" 

    in the string  "insert into IpAddressesCollections values ($ipcid,$ipaid)"

    To get list of all IP addresses and their id run the following in the terminal:

    # plesk db "select * from IP_Addresses"

     

    0
    Comment actions Permalink
  • Avatar
    amir b

    when i run 

    ./kb213371469.sh /root/affected_domains.txt

    this error has be shown:

    -bash: ./kb213371469.sh: Permission denied

    any suggestion?

    1
    Comment actions Permalink
  • Avatar
    Alexandr Redikultsev

    Hi @amir b.

    Try adding executable permissions to the script:

    # chmod +x kb213371469.sh

    2
    Comment actions Permalink
  • Avatar
    Turgut Kalfaoglu (Edited )

    Did not help me..

    # ./kb213371469.sh
    ./kb213371469.sh: line 34: $FILE: ambiguous redirect
    psa.IpAddressesCollections table for all domains has been updated

    # plesk repair mail somedomain.com
    Repairing the mail server configuration
    Reconfiguring the settings of domains: somedomain.com ......... [OK]
    Reconfiguring the mailboxes ..................................... [2020-11-23 12:30:26.494] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/mail
    name_repair'] with exit code [1]
    [FAILED]
    ...
    ERROR:__main__:This exception happened at:
    Traceback (most recent call last):
    File
    "/usr/local/psa/admin/sbin/mailname_repair/mailname_repair.py",
    line 152, in main
    File
    "/usr/local/psa/admin/sbin/mailname_repair/mailname_repair.py",
    line 68, in restore_outgoing_limits
    File
    "/usr/local/psa/admin/sbin/mailname_repair/plesk_outgoing_mail_db.py",
    line 320, in create_mailname
    mail_name, domain_name).rowcount
    File
    "/usr/local/psa/admin/sbin/mailname_repair/plesk_sqlite3_db.py",
    line 139, in run
    return conn.execute(query, params)
    IntegrityError: mails.domain_id may not be NULL
    Error messages: 0; Warnings: 0; Errors resolved: 0
    exit status 1

     

    0
    Comment actions Permalink
  • Avatar
    Turgut Kalfaoglu (Edited )

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Nse "SELECT d.name FROM domains d JOIN DomainServices ds on d.id=ds.dom_id LEFT JOIN I
    pAddressesCollections ipc on (ds.ipCollectionId = ipc.ipCollectionId ) WHERE ds.type='mail' AND ipc.ipCollectionId is NULL"
    [root@jedi turgut]#  

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Turgut Kalfaoglu

    When you're executing the script, you have to specify the file with domains list, generated at step 3:
    ./kb213371469.sh /root/affected_domains.txt

    As the bug is already fixed in Plesk Obsidian, the easiest way to resolve the issue is to update/upgrade Plesk to the most recent Obsidian and execute "plesk repair db".

    If the issue will remain even after this, contact Plesk Support.

    0
    Comment actions Permalink
  • Avatar
    Turgut Kalfaoglu (Edited )

    Many thanks -- for me that file in step 3 was empty. I will bring this issue to the talk forum.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request