{"id":456,"date":"2021-07-23T12:30:16","date_gmt":"2021-07-23T12:30:16","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-migrate-the-contents-of-email-accounts-in-addon-domains\/"},"modified":"2021-07-23T12:30:16","modified_gmt":"2021-07-23T12:30:16","slug":"how-to-migrate-the-contents-of-email-accounts-in-addon-domains","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-migrate-the-contents-of-email-accounts-in-addon-domains\/","title":{"rendered":"How to Migrate the Contents of Email Accounts in Addon Domains"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This document describes how to delete or migrate the contents of email accounts in addon domains.<\/p>\n<ul>\n<li>To create an email account on an addon domain, use cPanel\u2019s <em>Email Accounts<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Email &gt;&gt; Email Accounts<\/em>).<\/li>\n<li>To manage an addon domain, read cPanel\u2019s <em>Addon Domains<\/em> interface documentation (<em>cPanel &gt;&gt; Home &gt;&gt; Domains &gt;&gt; Addon Domains<\/em>).<\/li>\n<\/ul>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>In the following examples:<\/p>\n<ul>\n<li><code>old_account<\/code> represents the cPanel account <strong>from<\/strong> which you wish to move the addon domain\u2019s email account or accounts.<\/li>\n<li><code>new_account<\/code> represents the cPanel account <strong>to<\/strong> which you wish to move the addon domain\u2019s email account or accounts.<\/li>\n<li><code>domain_name<\/code> represents the addon domain\u2019s name.<\/li>\n<li><code>email_account<\/code> represents the name of the addon domain\u2019s email account that you wish to move.<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"addon-domain-deletion\">Addon domain deletion<\/h2>\n<p>When you remove an addon domain, its email accounts will no longer appear in cPanel\u2019s <em>Domains<\/em> (<em>cPanel &gt;&gt; Home &gt;&gt; Domains &gt;&gt; Domains<\/em>) interface. However, the contents for these emails account still exist in the <code>\/home\/old_account\/mail<\/code> directory.<\/p>\n<p>If you wish to permanently remove the contents of these accounts, in the command line or via a Terminal session, run the following command: <\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rm <span style=\"color:#f92672\">-<\/span>R <span style=\"color:#e6db74\">\/home\/o<\/span>ld_account<span style=\"color:#e6db74\">\/mail\/<\/span>domain_name<\/code><\/pre>\n<\/div>\n<h2 id=\"addon-domain-moved-to-another-account\">Addon domain moved to another account<\/h2>\n<p>If you move an addon domain to a different account, you <strong>must<\/strong> add the addon domain\u2019s email accounts manually and move the contents of those email accounts manually. The email accounts <strong>must<\/strong> follow the same name and domain format that they previously followed.<\/p>\n<p>Perform the following steps to migrate the contents of the mail accounts:<\/p>\n<ol>\n<li>\n<p>Use cPanel\u2019s <em>Email Accounts<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Email &gt;&gt; Email Accounts<\/em>) to add new accounts, or run  the addpop script to manually add new email accounts.<\/p>\n<\/li>\n<li>\n<p>In the command line or via a Terminal session, run the following command to move all email accounts to the new account: <\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">mv <span style=\"color:#e6db74\">\/home\/o<\/span>ld_account<span style=\"color:#e6db74\">\/mail\/<\/span>domain_name <span style=\"color:#e6db74\">\/home\/<\/span>new_account<span style=\"color:#f92672\">\/<\/span>mail<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Run the following command to change ownership of the files to the new account:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">chown <span style=\"color:#f92672\">-<\/span>R new_account:new_account <span style=\"color:#e6db74\">\/home\/<\/span>new_account<span style=\"color:#e6db74\">\/mail\/<\/span>domain_name<span style=\"color:#f92672\">.<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Verify the ownership of the email accounts after you move them. <\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">ls <span style=\"color:#f92672\">-<\/span>alR <span style=\"color:#e6db74\">\/home\/<\/span>new_account<span style=\"color:#f92672\">\/<\/span>mail<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview This document describes how to delete or migrate the contents of email accounts in addon domains. To create an email account on an addon domain, use cPanel\u2019s Email Accounts interface (cPanel &gt;&gt; Home &gt;&gt; Email &gt;&gt; Email Accounts). To manage an addon domain, read cPanel\u2019s Addon Domains interface documentation (cPanel &gt;&gt; Home &gt;&gt; Domains &hellip;<\/p>\n","protected":false},"author":1,"featured_media":457,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/456"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/457"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}