Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Forward Default cPanel Email Account  (Read 2236 times)

0 Members and 1 Guest are viewing this topic.

sujitht

  • Guest
Forward Default cPanel Email Account
« on: October 05, 2017, 04:24:01 am »
We all know to set forwarders for mail accounts in a cPanel server. But is it possible to set a forwarder for the emails of cPanel default address?

What is cPanel default email account?
==============================
when a cPanel hosting account is created, a default email account with the id username@servername.com too is created. You can either login to this account via WebMail interface of the cPanel server or else configure the account in a mail client.

By default this account acts as the alert email id and catch-all ( where all mails to non-existing email ids on the domain are forwarded) account for the hosting account. In majority cases, the client will come to know about the existence of the account only when his support guy asks him to clear the mails as the hosting account runs out of disk space. It necessitates one to think about the possibilities of setting up forwarders to avoid frequent episodes of disk space exhaustion.

Now,  If you are required to create an email forwarder for this email account, there are no direct options or cPanel functions to do this through the cPanel. That does not mean its not possible.

You can do this, provided you have cPanel access or SSH access to the account. This can be done by creating a .forward file at the home directory of the user account in question.

Steps to Follow:

Here I am explaining how to create the file over cPanel, but the steps are just the same if you are using SSH. All you have to do is create the file which I am about to mention with the entries required.

Step 1 : Login to cPanel.
Please use :2083 or :2082 port along with your domain or host-name to login to cPanel.
Step 2 : Navigate to cPanel >> File Manager (/home/username)
Step 3 : Create a file .forward under the home directory.
Step 4 : Change the file ownership to “user.mail”

Code: [Select]
chown user.mail .forward
ensure that “user” is replaced with the actual cPanel/account user name
Step 5 : Open the file and add the following entry.

Code: [Select]
\username, mail@domain.com
Here “\username” :: is the cPanel username, this entry will leave a copy of the email to the default email address.

Example: If your username is alice and you need to forward the mail to hello@example.com, add the following entry to the file
Code: [Select]
\alice, hello@example.com
This is quite effective if you wish to receive a copy of the alerts to your gmail id. Still the setting follows a store and forward pattern and won’t be much  useful if you wish to reduce the disk usage as well

If you want to forward the email to a remote address without a copy, add the second part (email address) only, that means the email address only, mail@domain.com. Replace mail@domain.com to the email account of choice eg: bob@example.com

Example: If the mail is to be forwarded to bob@example.com without retaining a copy locally, add the following line to the file .forward
Code: [Select]
bob@example.com