Original link: https://blog.shuziyimin.org/1355
Clouflare is the world’s largest CDN service provider by users, with 4 million users as of January 2022. Cloudflare mainly provides network-related services such as DNS resolution, network security DDOS protection, and CDN. Because the basic services are free, there are many users. In addition to DDOS protection and CDN, Cloudflare has rapidly expanded new businesses in recent years, such as Cloudflare Registrar domain name purchase service, Cloudflare R2 object storage service, etc.
This article mainly introduces the use of the Cloudflare Email Routing mailbox forwarding service. Friends who have a personal domain name can use the enterprise mailbox service or the mailbox forwarding service to create a custom domain name mailbox. Since DNS resolution service providers directly provide free and easy-to-configure services, why not try it?
1. Use Cloudflare DNS service
If your domain name already uses Cloudflare as the domain name resolution service provider, please go directly to the second step.
If you are still using the DNS resolution provided by the domain name registrar, or use other service providers, please consider whether to change the DNS service provider to Cloudflare. After switching, domestic access may be slow, and the simultaneous use of multiple domain name services is not supported. business, etc. If you are sure to switch, you can check the Cloudflare official website tutorial to operate.
2. Add Cloudflare’s MX records
Click Email in the Cloudflare background to start the configuration (the menu bar of the new version is on the left, which is slightly different from the figure below). Click Add Record to import Cloudflare’s own MX server record information with one click.
If MX records of other email service providers have been added to the DNS resolution records, you need to delete the original MX records first .
3. Configure Cloudflare Email Routing
3.1 Destination addresses configuration
Here we first configure the target email address. After filling in the target email address, the target mailbox will receive a verification email from Cloudflare, click the link in the email, and the verification is successful.
Destination addresses are shared by all domains under the same Cloudflare account. Under the same Cloudflare account, if you verify the email address [email protected] when configuring domain name A email forwarding, you can directly fill in [email protected] when configuring domain name B email forwarding without re-verification.
3.2 Custom addresses
After adding and verifying the target mailbox, when configuring here, fill in the domain name prefix you want to use and point to the target mailbox.
3.3 Catch-all address All email addresses
After configuring Catch-all, no matter what the mailbox prefix is, all emails sent to this domain name will be forwarded to the specified target mailbox.
Friends who care about privacy protection can use this service. For example, when registering various website services, use the service name to temporarily make a prefix, when registering craft, use [email protected]; when registering for disney+, use [email protected]. In this way, when you receive spam, you can know which service provider leaked your information, and you can also reject emails based on recipients.
4. Send emails with a custom domain name
For most users, just complete the above steps and use a custom domain name to receive emails. If you need to use a custom domain name to send emails, please see the following tutorial, here we take Gmail as an example.
4.1 Obtaining the Google Account Exclusive App Password
Open the link below in a new browser window. After logging in to your Google account, you can obtain a new dedicated app password on the Google app password configuration page. “Device” can choose other, and then fill in the custom information for easy memory. As shown in the figure below, I wrote “SZYM-test” to remark the password of this new application. Remember to save the password after obtaining it.
https://myaccount.google.com/apppasswords
4.2 Configuring Gmail
In Gmail Settings – Accounts and Import, find the location where the email is sent, click “Add a new email address”, as shown in the figure below.
Click to add a new email address, the following pop-up window will appear.
- The mailbox name will be used as the default name for subsequent emails, which will be displayed to the outside world, please fill in carefully.
- Domain email address, please configure this prefix domain email address in Cloudflare in advance to confirm that you can receive emails
go to the next step,
- SMTP needs to fill in smtp.gmail.com
- port The port can be left as default. If the protocol needs to be changed, the port needs to be changed accordingly
- username Fill in the original Gmail username, that is, the information except @gmail.com in the email address
- password requires the application-specific password obtained in step 4.1
If the above information is filled in successfully, you can enter the next page, and Gmail will receive an email, just fill in the corresponding verification code.
After the configuration is complete, you can choose a custom mailbox when sending emails. You can also use this email address as your default sender address in your Gmail settings.
This article is reprinted from: https://blog.shuziyimin.org/1355
This site is for inclusion only, and the copyright belongs to the original author.