UnderHost
Knowledgebase Docs

Email Setup in CloudPanel: Send and Receive Email

Setup email in CloudPanel. Create email accounts, configure DNS (MX records), SPF/DKIM, webmail access, email forwarding, security best practices.

On this page

Email is critical for business communication. CloudPanel includes email server (Postfix/Exim) for sending/receiving email. Setup takes 5 minutes: create account, configure DNS, add SPF/DKIM records. Your email is then ready with webmail access, mobile support, and spam filtering.

Email Overview

How email works:

  • Sending: Your app sends email → CloudPanel mail server sends to recipient
  • Receiving: Sender sends to your domain → mail server receives, stores in mailbox
  • Webmail: Access email from web browser (no client needed)
  • IMAP/POP3: Configure in desktop/mobile clients (Outlook, Thunderbird, etc.)

Email security requires three records:**

  • MX record: "Email for this domain goes here" (to your server)
  • SPF record: "These IPs are allowed to send email for this domain"
  • DKIM: Digital signature proving email came from you

Create Email Account

In CloudPanel:

  1. Login to CloudPanel (admin or domain owner)
  2. Go to Mailboxes → Add Mailbox
  3. Enter details:
    • Email address: admin@yourdomain.com
    • Password: Strong password (16+ chars, mixed case, numbers, symbols)
    • Storage quota: 5GB recommended (adjust as needed)
  4. Click "Create"
  5. Email ready to use immediately

Access email immediately via webmail:**

  • yourserver.com:8443/mail (webmail interface)
  • Or configure in Outlook/Thunderbird using IMAP

Configure DNS (MX Records)

Your domain registrar (GoDaddy, Namecheap, etc.) → DNS settings:

# Add MX record for email routing
Type: MX
Name: @ (or yourdomain.com)
Value: mail.yourdomain.com
Priority: 10

# Also add A record pointing to your server
Type: A
Name: mail
Value: 203.0.113.25 (your server IP)

Verify DNS propagation (wait 24 hours for full propagation):

nslookup -type=MX yourdomain.com
# Should show: yourdomain.com mail exchanger = mail.yourdomain.com

# Or use online tools: mxtoolbox.com

SPF/DKIM Security Records

SPF (Sender Policy Framework) - prevents email spoofing:

# Add TXT record to DNS
Type: TXT
Name: @ (or yourdomain.com)
Value: v=spf1 mx ~all
# Means: "Servers listed in MX records can send email"

DKIM (DomainKeys Identified Mail) - digitally sign emails:

  1. CloudPanel → Email → DKIM
  2. Click "Generate DKIM Key"
  3. Copy the provided DKIM record
  4. Add to DNS as TXT record
  5. Emails now digitally signed proving authenticity

CloudPanel shows DKIM status:**

  • Green = DKIM enabled and valid
  • Gray = DKIM DNS record not found yet

WebMail Access

Access webmail without any setup:**

  • URL: https://yourserver.com:8443/mail
  • Username: admin@yourdomain.com
  • Password: your email password

Webmail features:**

  • Send/receive email
  • Contacts and calendar (limited)
  • Spam filtering
  • Attachment support
  • Mobile-friendly interface

Configure Email Client

Setup in Outlook, Thunderbird, Apple Mail:

SettingValue
Email Addressadmin@yourdomain.com
IMAP Servermail.yourdomain.com or server IP
IMAP Port993 (SSL/TLS)
SMTP Servermail.yourdomain.com or server IP
SMTP Port587 (TLS) or 465 (SSL)
Usernameadmin@yourdomain.com
PasswordYour email password

Mobile (iPhone, Android):

  • Settings → Mail → Add Account
  • Choose "IMAP"
  • Enter details from table above
  • Email syncs automatically to phone

Email Forwarding

Forward emails automatically to another address:**

  1. CloudPanel → Mailboxes → [Your Email] → Forwarding
  2. Enter forward-to address (e.g., personal@gmail.com)
  3. Enable "Keep copy on server" if desired
  4. Save
  5. All new emails now copied to that address

Create email aliases (multiple addresses, one inbox):**

  • CloudPanel → Mailboxes → Add Alias
  • Example: support@yourdomain.com → admin@yourdomain.com
  • Emails to support@ go to admin's inbox

Troubleshooting

Can't receive email:

  • Check MX record: nslookup -type=MX yourdomain.com
  • Verify DNS propagation (wait 24 hours)
  • Check CloudPanel email account exists
  • Check mailbox isn't full

Emails going to spam:**

  • Add SPF record to DNS
  • Enable DKIM in CloudPanel
  • Add DMARC record (optional, advanced)
  • Recipient's spam filter may be overly aggressive

Can't send email / SMTP error:**

  • Check port 587 or 465 is open (firewall)
  • Verify SMTP credentials are correct
  • Check server IP isn't blacklisted (rblcheck.com)

WebMail won't load:**

  • Clear browser cache (CTRL+SHIFT+DEL)
  • Try different browser
  • Check firewall isn't blocking port 8443
Setup SPF/DKIM or emails go to spam

Without SPF and DKIM, recipient mail servers treat your emails as suspicious. Most emails end up in spam folder. Always configure both before going to production.

Related: Email setup | DNS configuration | SPF/DKIM setup | Email security

Was this article helpful?

Need CloudPanel on a server?

Use CloudPanel on an UnderHost VPS or dedicated server for fast PHP app and WordPress hosting without a heavy panel stack.

Back to CloudPanel