Deprecated: Function create_function() is deprecated in /home2/blogwebhostingbu/public_html/wp-content/plugins/facebook-like-box-responsive/facebook-like-box.php on line 29
{"id":1397,"date":"2011-03-23T13:28:12","date_gmt":"2011-03-23T13:28:12","guid":{"rendered":"http:\/\/www.webhostingbuzz.com\/blog\/?p=1397"},"modified":"2011-03-23T13:28:12","modified_gmt":"2011-03-23T13:28:12","slug":"manage-cpanel-mail-forwarders-via-ssh","status":"publish","type":"post","link":"https:\/\/blog.webhostingbuzz.com\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/","title":{"rendered":"Manage cPanel mail forwarders via SSH"},"content":{"rendered":"

In an earlier article I described how mail forwarders<\/a> work. They are a useful feature. So much so that some of us have long lists of forwarders for our domains.<\/p>\n

Creation and editing of mail forwarders is normally handled via cPanel’s web interface. Those of us with long lists, though, now find it awkward due to a change made by cPanel developers to sub-divide long lists of items such as mail forwarders into multiple pages<\/a>, as detailed in an earlier article.<\/p>\n

If you have VPS (virtual private server) hosting plan, you might prefer to directly edit the file containing the forwarders. This can be achieved via an SSH connection. For security purposes, SSH may by default be disabled on your server, so you may need to request SSH access from your host.<\/p>\n

Once logged in to your VPS as root, over SSH, change directory to etc\/valiases\/ :<\/p>\n

cd \/etc\/valiases\/<\/p>\n

In valiases you should see several files, one per domain. If you cannot find that directory, then ask your host, as configuration does vary somewhat, thought that is the most common path.<\/p>\n

Use Midnight commander (‘mc’ command), ‘vi’ or ‘nano’ commands to edit those files. To create a forwarder, add lines in this format:<\/p>\n

myaccount@domain.com<\/a>: myaccount@gmail.com<\/a>, myaccount@yahoo.com<\/a>
\n*: :fail: No Such User Here<\/p>\n

The last line is necessary to avoid delivery to non-existent mail accounts and addresses.<\/p>\n

Root access is one of the many advantages of a VPS hosting plan. It provides more control, more features, and ways to directly access files that are often faster than using the cPanel GUI.<\/p>\n","protected":false},"excerpt":{"rendered":"

In an earlier article I described how mail forwarders work. They are a useful feature. So much so that some of us have long lists of forwarders for our domains. Creation and editing of mail forwarders is normally handled via cPanel’s web interface. Those of us with long lists, though, now find it awkward due […]<\/p>\n","protected":false},"author":134,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[143,74],"tags":[],"yoast_head":"\nManage cPanel mail forwarders via SSH - WebHostingBuzz US Blog<\/title>\n<link rel=\"canonical\" href=\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manage cPanel mail forwarders via SSH - WebHostingBuzz US Blog\" \/>\n<meta property=\"og:description\" content=\"In an earlier article I described how mail forwarders work. They are a useful feature. So much so that some of us have long lists of forwarders for our domains. Creation and editing of mail forwarders is normally handled via cPanel’s web interface. Those of us with long lists, though, now find it awkward due […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHostingBuzz US Blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-03-23T13:28:12+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/#website\",\"url\":\"https:\/\/www.webhostingbuzz.com\/blog\/\",\"name\":\"WebHostingBuzz US Blog\",\"description\":\"Hosting, hosting, more hosting and a little of everything else\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.webhostingbuzz.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/#webpage\",\"url\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\",\"name\":\"Manage cPanel mail forwarders via SSH - WebHostingBuzz US Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/#website\"},\"datePublished\":\"2011-03-23T13:28:12+00:00\",\"dateModified\":\"2011-03-23T13:28:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/#\/schema\/person\/b4eacaf6cae2f9666e137b91e8d83a71\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\",\"url\":\"https:\/\/www.webhostingbuzz.com\/blog\/2011\/03\/23\/manage-cpanel-mail-forwarders-via-ssh\/\",\"name\":\"Manage cPanel mail forwarders via SSH\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/#\/schema\/person\/b4eacaf6cae2f9666e137b91e8d83a71\",\"name\":\"Alan Burns\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.webhostingbuzz.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e051b4a10a90049d6e913ff8ab111a1a?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e051b4a10a90049d6e913ff8ab111a1a?s=96&r=g\",\"caption\":\"Alan Burns\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/posts\/1397"}],"collection":[{"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/users\/134"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/comments?post=1397"}],"version-history":[{"count":0,"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/posts\/1397\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/media?parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/categories?post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.webhostingbuzz.com\/wp-json\/wp\/v2\/tags?post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}