CyberHosting

Tutorial Request: Setting up a working email account in Cyberpanel

edited December 2019 in Tutorials
I'm looking for a straightforward tutorial on the steps to create a working rainloop email account from start-to-finish for a domain created in cyberpanel. I'm also using cloudflare on the domain if that significantly changes anything. So far, I figured that I need to:

- create a site in cyberpanel (check)
- create an email in cyberpanel (check)
- (maybe) create a nameserver for my domain from within cyberpanel (check)
- copy the mx record over to cloudflare (but not necessarily my DNS provider - check)
- ensure ports 25 or 587 are not being blocked by cyberpanel, my VPS provider, or cloudflare (check)

This did not work.

I then decided to attempt setting up a 3rd-party SMTP provider to see if that would work - and also I figured I needed to set that up to allow wordpress to send notifications to users, since that wasn't working either.

- create an account at mailgun (check)
- copy over the mailgun mx and txt records to cloudflare (check)
- verify my domain at mailgun (check)
- create an SMTP host in cyberpanel, mysite > manage (check)

no go. After doing all this I get the following errors from mxtoolbox.com:

- dmarc mysite.com DNS Record not found
- smtp mail.mysite.com Failed To Connect
- smtp mail.mysite.com Problem getting IP Address for mail.mysite.com
- mx mysite.com No DMARC Record found
- mx mysite.com DMARC Quarantine/Reject policy not enabled
- dns mysite.com SOA Serial Number Format is Invalid
- dns mysite.com SOA Expire Value out of recommended range
- smtp mxb.mailgun.org Reverse DNS does not match SMTP Banner
- smtp mxa.mailgun.org Reverse DNS does not match SMTP Banner

After this, I second helloswant's request for a good tutorial on how to set up a working email account in a fresh install of cyberpanel! I've been pouring over the resource section to find a solution but the perspective of the tutorials is very narrow to specific steps, seemingly assuming that the reader knows what to do on the whole. In reality, I'm coming from a shared hosting provider and never had to deal with anything beyond adding mx records to my DNS account and determining what the mail server address is to copy/paste into the mail client on my phone and desktop.

I don't actually know if I even need to do anything on the server first, or if I needed to sign up for mailgun at all, or if I can just configure the mail server on cyberpanel to send out wordpress notifications through the [email protected] account once that's working properly, or if all I need is some simple wordpress plugin that will do everything for me. I can tell cyberpanel comes with a learning curve but I don't know why there isn't a proper tutorial to do this basic first step from beginning to end...

Comments

  • edited December 2019
    Upon further investigation, I found a more in-depth tutorial at https://blog.cyberpanel.net/2018/05/15/achieve-10-10-email-score-with-cyberpanel/. The instructions are as follows:

    Step 1: Install or upgrade CyberPanel (check)

    Step 2: Make sure CyberPanel is handling your DNS
    I see how to do this on google domains' DNS settings, but it's currently pointing to cloudflare's nameservers to use that service and the linked tutorial at https://blog.cyberpanel.net/2018/02/24/how-to-register-private-name-servers-on-namecheap-or-godaddy-with-cyberpanel/ does not provide details on how to configure private name servers with a domain linked to cloudflare - though it says "You need to create your own DNS server or use a DNS provider such as Cloudflare." Upon investigation it appears as though configuring "custom name servers" on cloudflare requires a "business" account. I went ahead and created a DNS zone in cyberpanel but such a gap in the existing tutorial means I can only guess how to complete this step correctly. Do I create a DNS zone for the domain on cyberpanel? What records are required? Where should I place the records? In cloudflare's DNS settings? In google domain's DNS settings? In both? And if I place them over at google domains DNS setting's, do I add them in *addition* to cloudflare's name servers or in the custom resource records section as type NS? Do I still need to do anything at cloudflare or am I done when I add a private nameserver to google domains DNS settings? Should I delete the google NS records at Cloudflare? (ns-cloud-e1.googledomains.com)

    Step 3: Setup RDNS and Hostname!
    All this step really says is, "If I check RDNS of my IP Address it should point back to this domain," and then, "Once you set the RDNS, follow the guide below to setup same domain as a hostname on your mail server." What? How do I setup up the RDNS though? It includes a link to "setup same domain as a hostname on your mail server" in the same step, but that seems like a separate, but related, process (https://cyberpanel.net/docs/2-ssl-for-postfix-dovecot/). I was able to complete that step, so I kind of want to assume I already have RDNS setup(?), but mxtools.com doesn't seem to think so... :/

    Step 4: Create Website with DKIM Support
    Okay, I created DKIM records when I created a website and I see the TXT records in cyberpanel, DNS > Add/Delete Records > TXT. But do I put them in cloudflare, google domains, or both? I'm putting these all in cloudflare, along with the private nameserver records I created in cyberpanel on a whim just so I can get to the end of the tutorial.

    Step 5: Verify your email Score
    The snail just went on and on.

    REDO Step 4:
    I deleted all the custom resource records from google domains > DNS settings, leaving only cloudflares name servers in the top name server section, and then I deleted the NS records pointing to google DNS over at Cloudflare. I made sure the A (mail, mysite.com), CNAME (www), MX (mysite.com), NS (for ns1 and ns2), and TXT records (default._domainkey, _domainkey, _dmarc, mysite.com) created in cyberpanel were all stored over at Cloudflare. Didn't work. Two things with this configuration that confused me: some of the records were "proxied" by cloudflare and I also set up mailgun earlier trying to get wordpress to send out notifications to users (is that a potential conflict?). This gets me these errors at mxtools.com:

    - dmarc mysite.com No DMARC Record found
    - mx mysite.com No DMARC Record found
    - spf mysite.com More than one record found
    - mx mysite.com DMARC Quarantine/Reject policy not enabled
    - dns mysite.com SOA Serial Number Format is Invalid
    - dns mysite.com SOA Expire Value out of recommended range
    - smtp dc-dd6cbf54acac.mysite.com Reverse DNS does not contain the hostname
    - smtp dc-dd6cbf54acac.mysite.com Reverse DNS does not match SMTP Banner
    - smtp mxa.mailgun.org Reverse DNS does not match SMTP Banner
    - smtp mxb.mailgun.org Reverse DNS does not match SMTP Banner

    The error for spf: "more then one record found" does tell me maybe using gunmail is an either/or choice. I then deleted all the records for gunmail in cloudflare and I was able to get emails in my rainloop account, but I still don't seem to be able to send emails from rainloop.
  • edited December 2019
    UPDATE: I've found a tutorial for "How to Create Reverse DNS or PTR Records in the Vultr Control Panel," at Vultr, my particular VPS provider, see https://www.vultr.com/docs/how-to-create-reverse-dns-or-ptr-records-in-the-vultr-control-panel. I was able to easily follow the steps but was not sure how to determine the reverse DNS value using Vultr's IPv6 Subnet Calculator. I threw in a couple of numbers at the end of my IPV6 subnet as shown in the tutorial and tested it until I found one that was within range so the form allowed me to submit it.

    However, when I tested outgoing it still didn't work, (I was able to get incoming mail as described in my last post). So I followed the instructions on another Vultr article, "Configuring IPv6 on your VPS" at https://www.vultr.com/docs/configuring-ipv6-on-your-vps assuming that was necessary.

    It's still not working and I will be writing to Vultr today about it and will post another update when I get a response. In the meantime, if anyone has any comments about the steps that I have followed through this process, i.e., those that may have been unnecessary, or ill-advised, or wrongly configured, or anything else please let me know. I plan to post the final process that gets incoming/outgoing email working for others to read and for future reference as well.

    Thank You!
  • Has anyone responded to your request for help? Have you learned anything yet?
  • Long story short, I used the instructions from Vultr to set up IPv4, instead of IPv6 and I had to get them to unblock SMTP ports as well. I'm getting an 8.9 out of 10 from https://www.mail-tester.com/ but still get the message "Your IP address 12.33.44.567 is associated with the domain 12.33.44.567. Nevertheless your message appears to be sent from mywebsite.com." I think that has something to do with the fact that I'm still running cyberpanel on the default 12.33.44.567:8090 address (the address to my rainloop account is 12.33.44.567:8090/rainloop). I'm going to fix that at some point but otherwise I think everything is working. Since I figured this all out myself I would only ask that the existing tutorial at https://blog.cyberpanel.net/2018/05/15/achieve-10-10-email-score-with-cyberpanel/ is updated to clarify the points that are confusing or unclear.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!