Best Web Host Help Page – Email Forwarders

Best Web Host Help Page – Email Forwarders

BestWebHost.com

Best Web Host Email Forwarders allow a copy of any email sent to one address to be forwarded to another address. This lets you use one account to check mail sent to several email addresses. You can also discard email or send (pipe) mail to a program.

To view forwarders for a specific email address on your account, click the Managing menu and choose the domain for which you wish to set forwarders.

To quickly find a specific email address, enter a keyword in the Search field and click Go.

Add a Mail Forwarder

To add a mail forwarder:

  1. Click Add Forwarder.

  2. After Address to Forward, type the address whose email you wish to forward. Be sure to select the correct domain from the drop-down menu.

  3. Select 1 of 5 options:Click Add Forwarder.

    • Basic options:Advanced options:

      • To forward mail, click Forward to email address and type the address to which mail should be forwarded.

      • To discard incoming messages and automatically send a failure notice to the sender, click Discard with error to sender.

      • To automatically forward messages to a program, define a path to the program (for example, /home/$utility) in the Pipe to a Program field.

      • To discard incoming messages click Discard (Not Recommended).

        • Important: This option is the preferred option even though it says not recommended. All other options will cause you to get more spam

To view the route that a forwarded message takes, select Trace in the list of forwarded addresses. This makes it possible, for example, to locate a mail routing error.

Important: If you wish to forward mail to another account without receiving mail at your cPanel account, create a forwarder from an address that does not have a corresponding account in
Best Web Host Control Panel (cPanel). Alternatively, if the account already exists, you can delete it in
Best Web Host Control Panel (cPanel). Afterward, all mail will be forwarded to the destination you have configured using the Forwarders feature.

If you do not delete the Best Web Host Control Panel (cPanel) account whose mail is being forwarded, then both accounts will receive mail.

How to use the Pipe to Program Option

When you use the pipe to program option, enter a path relative to your home directory. For example, if your username is ‘john’, and your script is in your home directory at /home/john/script.pl, you would enter this in the Pipe to a Program box: test.pl

To ensure the script will work, the script must be executable. The hashbang line must also exist at the top of the script

  • If you are using PHP, this should be the hashbang line at the top of the script: #!/usr/local/bin/php -q

  • If you are using Perl, this should be the hashbang line at the top of the script: #!/usr/bin/perl

If a hashbang is not in your script, enter the path to the Perl or PHP interpreter in the Pipe to a Program box. This should be followed by the full path to the script:

  • Perl users run this command: /usr/bin/perl /home/john/test.pl

  • PHP users run this command: /usr/local/bin/php /home/john/test.php

If you are using PHP, ensure that your code is appropriately wrapped in start and end tags.

Make sure that your script uses the proper file permissions (0700). To change your script’s file permissions: chmod 0700 myscript.php where myscript.php is meant to stand for your script’s location and file name.

Remove a Mail Forwarder

To delete a forwarder:

  1. Click Delete next to the appropriate forwarded address.

  2. Confirm that this forwarder should be deleted on the following page.

Add a Domain Forwarder

This feature will allow all mail sent to a domain to be forwarded to another domain. Adding a domain forwarder will override the default address for the selected domain.

To add a domain forwarder:

  1. Click Add Domain Forwarder.

  2. Enter the domain to which you would like to forward email.

  3. Click Add Domain Forwarder.

note Note: Domain forwarding takes place only when a delivery is not successful. For example, a user sends an email to john@example1.com. If john@example1.com is an existing email address or auto responder, then the email will not be forwarded. The email will be forwarded if john@example1.com is not an existing email address or auto responder.

Remove a Domain Forwarder

To remove a domain forwarder:

  • Click the button under the Delete heading that corresponds to the domain forwarder you would like to remove.