Setting up email on new host?
Apologies for this long-winded question, but I'm new to cPanel and want to make sure my question is clear despite my ignorance of proper terminology.
I'm moving my site from it's current host (old-host) to a new hosting service (new-host). There is one domain (old-domain) hosted on old-host. I've currently setup one domain (new-domain) on new-host, but will be moving old-domain over to new-host when everything is ready. There are hundreds of email accounts hosted on old-domain; these are managed by a procmail script that routes each message received into one of a dozen or so folders on a single default email account. I've currently setup equivalent email accounts on new-domain, and figured out how to route them to a similar set of a dozen or so folders on a default email account using cPanel's Global Email Filters. There is a filter corresponding to each email account which examines the TO field of any received email, and if it begins "email-acct@" routes it to the appropriate folder for that "email-acct". Unfortunately, I found that I had to actually create each and every "email-acct" before the Global Email Filter would be applied to emails addressed to that account, even though the message is not stored in "email-acct". In any case, this has all been setup now and appears to be working. My next task is to move old-domain over to new-host and apply the same technique to routing emails received on that domain into the same collection of folders. But, hopefully, not to have to create a whole new set of email accounts and/or filters for old-domain.
I see a couple of cPanel tools that might allow me to do this, given the details of how they work. I'm hoping that some of you experts on cPanel might be kind enough to answer my questions and/or offer advice on how to proceed.
USE EMAIL DOMAIN FORWARDERS
1) If I forward all email for old-domain to new-domain, will I need to setup email accounts for all old-domain addresses? If so, this will require hundreds more email accounts, and is thus not worth it -- I may as well just setup a forwarder for each account.
2) If I do NOT need to setup all the old-domain addresses, will the Email Domain Forwarder leave the beginning of the TO address (up to the @) intact so that the Global Email Filters will route the email to the proper folder?
USE A DOMAIN ALIAS
Same two questions apply... will I need to setup all old-domain addresses for this to work and, if not, will the TO field of the email retain the info needed for the Global Email Filters to route the email to the proper folder?
Any advice or suggestions would be most appreciated! And thanks for suffering through this long winded question.
-
I believe you would be fine with a domain forwarder and the answer is in the documentation here: Forwarders | cPanel & WHM Documentation You absolutely would *not* want the email addresses of the old domain to be present since the documentation states: [QUOTE] Domain forwarders only forward email when the system cannot deliver it to an address or autoresponder. For example, if you create a domain forwarder from the example.com domain to the example1.com domain and someone sends an email to the user@example.com address, the following actions will occur: - If a user@example.com address or autoresponder exists, the system will not forward the email.
- If a user@example.com address or autoresponder does not exist, the system will forward the email to user@example1.com.
0 -
I'm sorry I missed that. it will most definitely keep the first part. I confirmed this on my own test server as well: I'm forwarding all email to domain1.net ->domain2.wiki lauren@domain1.net does not exist lauren@domain2.wiki does exist In the following mail transaction we can see the end result of an email sent from lauren@domain1.net is the email is redirected to lauren@domain2.wiki 2020-10-23 17:19:35.915 [26872] 1kW5PH-0006zF-AC => lauren F= P= R=virtual_user T=dovecot_virtual_delivery S=4709 C="250 2.0.0 eFWONfdWk1/7aAAA9Z/phw Saved" QT=4.599s DT=0.033s 0
Please sign in to leave a comment.
Comments
3 comments