Wednesday, January 23, 2019

Email Forwarders

I really like email forwarders.

In January 2018, I wrote and posted an article titled "Domain Management: Email Forwarders" (the link will open in a new window. You can read it now, and then return to continue reading here).

Here is a way to create a plain text file that you can use to quickly import forwarders into cPanel.

This technique will facilitate creating all the forwarders you need and want, and then review them before actually implementing them!




Conventions:
yourdomain and yourdomain.com ~~ the domain name used for this tutorial.
YPM@google.com ~~ your private email account
Your Name ~~ where "Your" is your firstname and "Name" is your last name


First, we have to create an empty csv document:

  1. Use file manager go to your favorite folder.
  2. Right-click to create a text file titled yourdomain.txt. 
  3. Right-click (or F2) to rename your file yourdomain.csv ~ you will receive a warning, but just acknowledge it to continue. 
  4. Finally, open with notepad or your favorite text editor: 


Next, we need to copy and paste the following set of forwarders into the .CSV document.


Source,Target
0.admin@yourdomain.com,YPM@Google.com
abuse@yourdomain.com,0.admin@yourdomain.com
billing@yourdomain.com,0.admin@yourdomain.com
help@yourdomain.com,0.admin@yourdomain.com
info@yourdomain.com,0.admin@yourdomain.com
listmaster@yourdomain.com,0.admin@yourdomain.com
postmaster@yourdomain.com,0.admin@yourdomain.com
webmaster@yourdomain.com,0.admin@yourdomain.com
postmaster@yourdomain.com,0.admin@yourdomain.com
sales@yourdomain.com,0.admin@yourdomain.com
social@yourdomain.com,0.admin@yourdomain.com
support@yourdomain.com,0.admin@yourdomain.com

0.yourname@yourdomain.com,YPM@Google.com
your@yourdomain.com,0.yourname@yourdomain.com
name@yourdomain.com,0.yourname@yourdomain.com
your.name@yourdomain.com,0.yourname@yourdomain.com

wordpress@yourdomain.com,0.admin@yourdomain.com
contact.form@yourdomain.com,0.admin@yourdomain.com
wordfence@yourdomain.com,0.admin@yourdomain.com
admin-login@yourdomain.com,0.admin@yourdomain.com


Now we can work with the list in Notepad:
  • The first line should always be "Source,Target"
  • There are no spaces or tabs in the rest of the file, and a comma separates the two email addresses
  • Forwarding to a forwarder is OK but be very, very careful about creating a circular loop. Preparing the fowarders off-line, and the importing them, is a good way to prevent looping
  • Forwarders are listed alphabetically. A zero-dot name will rise to the top of the list
  • Delete the forwarders you do not want to create
  • Use the search-and-replace tool to replace 
    • yourdomain.com with the actual name of the domain name for which you are creating forwarders
    • YPM@Google.com with your private email account (should be two occurrences)
    • yourname with a combination of your first and last name (not for publication)
  • 0.yourname requires special 
  • Blank lines make the sections easier to read and are ignored during the import process.
  • Numbered email addresses (0.admin) are for internal use only, and should never be published
  • Remember to save the file before proceeding to the next step.

Finally, open cPanel, go to the mail section, select "Address Importer," then follow the prompts.
The import process ignores duplicates, so there is a value to saving the file for future use.


Bonus: This is a valuable concept when you need to create an organizational set of forwarders. Here is a set of forwarders I created in a text.csv document for a homeowners association..

Email,Forward To
1.president@yourdomain.com,<personal email>
2.vicepresident@yourdomain.com,<personal email>
3.secretary@yourdomain.com,<personal email>
4.treasurer@yourdomain.com,<personal email>
5.directoratlarge@yourdomain.com,<personal email1>
5.directoratlarge@yourdomain.com,<personal email2>
5.directoratlarge@yourdomain.com,<personal email3>
9.directors@yourdomain.com,1.president@yourdomain.com
9.directors@yourdomain.com,2.vicepresident@yourdomain.com
9.directors@yourdomain.com,3.secretary@yourdomain.com
9.directors@yourdomain.com,4.treasurer@yourdomain.com
9.directors@yourdomain.com,5.directoratlarge@yourdomain.com
president@yourdomain.com,1.president@yourdomain.com
vicepresident@yourdomain.com,2.vicepresident@yourdomain.com
vice-president@yourdomain.com,2.vicepresident@yourdomain.com
secretary@yourdomain.com,3.secretary@yourdomain.com
treasurer@yourdomain.com,4.treasurer@yourdomain.com
directors@yourdomain.com,9.directors@yourdomain.com
info@yourdomain.com,9.directors@yourdomain.com


  • Use the search-and-replace tool to replace yourdomain.com with the actual name of the domain name for which you are creating forwarders
  • Replace the generic "personal email" with the actual email of the officers and directors
  • Delete any of the officer or directoratlarge forwarders that are not used ~ remember they are in several places in the list
  • Because they are numbered, the personal email addresses will sort to the top of the alphabetized list.
  • There is only one address to change when a vacancy occurs on the board; then all future email will be forwarded to the new officer...
  • The board can publish names, titles, and an email address while the personal email addresses are hidden from public view. Remember, numbered email addresses (0.president..) should never be published. They are for internal use only.
  • The idea is to communicate! I use two forwarders for the vice present role (one with a dash and one without a dash) but there is still only one destination address to maintain
  • The actual roles are for learning and illustration. Your organization may choose to use 9.officers@... or 9.staff@... for global redirection: use a naming convention that fits your organization.
  • Remember, save the file! 
    • cPanel is smart enough to not create duplicates if you import the same list multiple times. 


No comments:

Post a Comment