The copy_user_mail_as_user Script

Valid for versions 96 through the latest version


Last modified: March 19, 2021

Overview

The /usr/local/cpanel/scripts/copy_user_mail_as_user script copies a cPanel account’s mail to or from a remote server as the account. After you run the script, it will prompt for an API token for the cPanel account on the remote server.

Run the script

To run this script on the command line, use the following format:

/usr/local/cpanel/scripts/copy_user_mail_as_user [options]

Options

Use the following options with this script:

Option Description Example
--mode Required
Whether to copy the account’s mail to the local server or a remote server:
  • tolocal — Download mail from a remote server to the local server.
  • toremote — Upload mail from the local server to a remote server.
--mode=toremote
hostname Required
The hostname to copy the account’s mail to or from.
example.com
username Required
The cPanel account’s username.
exampleuser
--help Display the script’s help documentation --help

Example

The following example uploads the exampleuser account’s mail to the example.com remote server:

/usr/local/cpanel/scripts/copy_user_mail_as_user --mode=toremote example.com exampleuser
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The servers_queue Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The auto-adjust-mysql-limits Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The autossl_check Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup_restore_manager Script

Valid for versions 82 through the latest version Last modified: July 28, 2022...