To make your email server work with your domain jamjhadi.shop, you need to add the following DNS records:
Type: A
Name: mail
Value: YOUR_SERVER_IP
TTL: 3600
Type: MX
Name: @
Value: mail.jamjhadi.shop
Priority: 10
TTL: 3600
Type: TXT
Name: @
Value: v=spf1 mx a ip4:YOUR_SERVER_IP ~all
TTL: 3600
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=quarantine; rua=mailto:manager@jamjhadi.shop
TTL: 3600
- Log into your Cloudflare dashboard
- Select your domain
jamjhadi.shop - Go to DNS > Records
- Add each record above, replacing
YOUR_SERVER_IPwith your actual server IP
- Log into your domain registrar's control panel
- Find the DNS management section
- Add the records above
- Replace YOUR_SERVER_IP: You need to replace
YOUR_SERVER_IPwith your actual server's public IP address - TTL: Time To Live - 3600 seconds (1 hour) is recommended
- MX Priority: Lower numbers have higher priority (10 is standard)
- SPF Record: This tells other email servers that your server is authorized to send emails for your domain
After adding DNS records, you can test them using:
# Test MX record
dig MX jamjhadi.shop
# Test A record
dig A mail.jamjhadi.shop
# Test SPF record
dig TXT jamjhadi.shopYou'll also need to update the config.js file with your server's IP address:
dns: {
a: {
subdomain: 'mail',
ip: 'YOUR_ACTUAL_SERVER_IP' // Replace with your server IP
},
spf: 'v=spf1 mx a ip4:YOUR_ACTUAL_SERVER_IP ~all'
}Make sure your server allows incoming connections on:
- Port 25 (SMTP)
- Port 3001 (Web interface)
- Port 3002 (API)
If you're behind a firewall, you may need to configure port forwarding.