The copy_user_mail_as_user Script
Valid for versions 96 through the latest version
Version:
96
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:
|
--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