Search Engine: Elastic

Article ID: 122519, created on Jul 29, 2014, last review on Jul 14, 2018

  • Applies to:
  • Plesk Automation 11.5


Migration from Plesk to Plesk Automation (PA) fails with the following error or mail creation in PA fails:

[ERROR] restore/customer| Failed to perform an action on auxiliary user '' of client 'wardn': Failed to create auxiliary user in Plesk. Exception message: The command "ALLOW_WEAK_PASSWORDS=1 /usr/local/psa/bin/user --create -domain-admin true -cname '' -role 'Application User' -passwd myprettypassword -company '' -phone '' -fax '' -address '' -city '' -state '' -zip '' -country '' -im '' -im-type '' -comment '' -owner wardn -status enabled -email -subscription-name ''" executed at PPA management node returned a non-zero exit code. 

ERR (3)  [util_exec]: proc_close() failed
Error occured while sending feedback. HTTP code returned: 502
ERR (3)  [panel]: Exception: Error: ERROR:spammng:Multiple errors occurred:
Command '['/usr/local/psa/admin/sbin/mail_handlers_control', '--add', '--priority=10', '--executable=/usr/local/psa/handlers/hooks/spam', '--name=spam', '--enabled', '--queue=before-local', '', '--context=move', '--type=recipient', '--dont-preserve-on-restore']' returned non-zero exit status 255 


The error is caused by the fact that the /usr/local/psa/admin/sbin/mail_handlers_control utility is not able perform actions with its SQLite database on Postfix node. To check the issue perform the following steps:

  1. Execute the following command on Postfix service node:

    # /usr/local/psa/admin/sbin/mail_handlers_control --list
  2. If it fails with error, check the /usr/local/psa/var/log/maillog, you see the following:

    pleskmail1 mail_handlers_control[27845]: Unable to prepare SQL statement for query 'SELECT queue, type, enabled, priority, name, address, executable, context, protected FROM handlers ORDER BY address': no such column: protected
  3. Check the structure of handlers table in SQLite database which contains mailhandlers by the following commands:

    # sqlite3 /var/lib/plesk/mail/handlers/handlers.db
    # sqlite> .schema

    The output should be as follows:

            CREATE TABLE handlers (queue INTEGER, type INTEGER, enabled BOOLEAN, priority INTEGER, name VARCHAR(255) NOT NULL, address VARCHAR(2048) NOT NULL, executable VARCHAR(2048) NOT NULL, context VARCHAR(2048) NOT NULL, protected BOOLEAN NOT NULL default 0, CONSTRAINT uniq_entries_constaraint PRIMARY KEY (queue, type, name, address, executable, context));
            CREATE INDEX idx1 ON handlers(queue, type, enabled, address);
            CREATE INDEX idx2 ON handlers(queue, type, enabled, address, priority);
            CREATE INDEX idx3 ON handlers(name, queue, type, address);
            CREATE INDEX idx4 ON handlers(name, queue, type);

    If structure is not correct, database should be recreated.


  1. Create a copy of /var/lib/plesk/mail/handlers/handlers.db:

    #cp /var/lib/plesk/mail/handlers/handlers.db /var/lib/plesk/mail/handlers/handlers.db.back
  2. Replace it with attachment.

33a70544d00d562bbc5b17762c4ed2b3 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF