Configure DNS records to enable receiving emails at use.25cent.cloud for the Temporary Email service.
When someone sends an email to [email protected], the following flow occurs:
Sender ────────► Sender's Mail Server │ DNS MX lookup for use.25cent.cloud │ ▼ MX Record: mail.25cent.cloud (resolves to 5.183.9.216) │ SMTP connection on port 25 │ ▼ Haraka SMTP Server (running on VPS, port 25) │ Parses email, extracts fields │ POST /api/temp-email/incoming │ ▼ 25cent.cloud API (matches inbox, stores message) │ ▼ User sees email in dashboard
Add these records to your DNS provider (Cloudflare) for the 25cent.cloud zone:
This tells other mail servers where to deliver email for use.25cent.cloud.
| Type | Name | Mail Server | Priority | TTL | Proxy |
|---|---|---|---|---|---|
MX |
use |
mail.25cent.cloud |
10 |
Auto | DNS only (no proxy) |
The MX record points to mail.25cent.cloud, so you need an A record resolving that hostname to your VPS IP.
| Type | Name | Content | TTL | Proxy |
|---|---|---|---|---|
A |
mail |
5.183.9.216 |
Auto | DNS only (no proxy) |
mail A record must also be "DNS only" (gray cloud). SMTP traffic (port 25) cannot pass through Cloudflare's proxy.
Prevents spoofing and improves deliverability. Add a TXT record for use.25cent.cloud:
| Type | Name | Content | TTL |
|---|---|---|---|
TXT |
use |
v=spf1 ip4:5.183.9.216 a:mail.25cent.cloud ~all |
Auto |
Adds policy enforcement and reporting for email authentication:
| Type | Name | Content | TTL |
|---|---|---|---|
TXT |
_dmarc.use |
v=DMARC1; p=none; rua=mailto:[email protected] |
Auto |
Set a PTR record for 5.183.9.216 → mail.25cent.cloud via your Hostinger VPS control panel. This improves trust with receiving mail servers.
25cent.cloud zone.
MXusemail.25cent.cloud10Amail5.183.9.216TXTusev=spf1 ip4:5.183.9.216 a:mail.25cent.cloud ~allTXT_dmarc.usev=DMARC1; p=none; rua=mailto:[email protected]You need an SMTP server running on the VPS to accept inbound mail on port 25 and forward it to the API webhook. Haraka is recommended — it's a Node.js-based mail server that integrates perfectly.
# Install Haraka globally sudo npm install -g Haraka # Create Haraka instance sudo haraka -i /etc/haraka # Verify installation haraka --version
/etc/haraka/config/smtp.ini
listen=0.0.0.0:25 nodes=1 daemonize=true max_received_count=10 max_message_size=10485760 ; 10 MB
/etc/haraka/config/host_list — Domains to accept mail for:
use.25cent.cloud
/etc/haraka/config/plugins — Enable required plugins:
# Connection-level max_unrecognized_commands tls dnsbl # Envelope rcpt_to.in_host_list # Data data.headers # Queue — forward to your API queue/webhook
Create the file /etc/haraka/plugins/queue/webhook.js to forward incoming emails to your API:
const http = require('http'); exports.hook_queue = function(next, connection) { const txn = connection.transaction; const rcptTo = txn.rcpt_to[0].original.replace(/[<>]/g, ''); const mailFrom = txn.mail_from.original.replace(/[<>]/g, ''); let body = ''; txn.message_stream.on('data', (chunk) => body += chunk); txn.message_stream.on('end', () => { const payload = JSON.stringify({ to: rcptTo, from: mailFrom, fromName: txn.header.get('From').replace(/<.*>/, '').trim(), subject: txn.header.get('Subject').trim(), text: body, html: '', messageId: txn.header.get('Message-ID').trim(), size: Buffer.byteLength(body), }); const req = http.request({ hostname: '127.0.0.1', port: 3005, path: '/api/temp-email/incoming', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload), }, }, (res) => { if (res.statusCode === 201) { next(OK, 'Message accepted'); } else { next(DENY, 'Mailbox not found or inactive'); } }); req.on('error', (err) => { connection.logerror('Webhook error: ' + err.message); next(DENYSOFT, 'Temporary failure, try again later'); }); req.write(payload); req.end(); }); };
# Start Haraka with PM2 for process management sudo pm2 start haraka --name "mail-server" -- -c /etc/haraka # Save PM2 config so it restarts on reboot sudo pm2 save # Check status sudo pm2 status mail-server
# Open port 25 for inbound SMTP sudo ufw allow 25/tcp # Verify sudo ufw status | grep 25
# Check MX record dig MX use.25cent.cloud +short # Expected: 10 mail.25cent.cloud. # Check A record dig A mail.25cent.cloud +short # Expected: 5.183.9.216 # Check SPF dig TXT use.25cent.cloud +short # Expected: "v=spf1 ip4:5.183.9.216 a:mail.25cent.cloud ~all" # Test MX resolution nslookup -type=MX use.25cent.cloud
# Test raw SMTP connection telnet mail.25cent.cloud 25 # Or with openssl: openssl s_client -connect mail.25cent.cloud:25 -starttls smtp # Quick test with swaks (SMTP testing tool): swaks --to [email protected] --from [email protected] \ --server mail.25cent.cloud --port 25 \ --header "Subject: Test Email" --body "Hello from test!"
[email protected])GET /api/temp-email/inboxes/{id}/messages# Haraka logs sudo pm2 logs mail-server --lines 50 # API logs (check for incoming webhook calls) sudo pm2 logs 25cent-api --lines 50 | grep temp-email
Already configured above. SPF tells receiving servers which IPs are authorized to send on behalf of use.25cent.cloud.
v=spf1 ip4:5.183.9.216 a:mail.25cent.cloud ~all
ip4:5.183.9.216 — Authorize this specific IPa:mail.25cent.cloud — Authorize the IP of mail.25cent.cloud~all — Soft-fail everything else (use -all for strict reject)DKIM adds a cryptographic signature to outgoing emails. Generate a DKIM key pair and add to DNS:
# Generate DKIM keys openssl genrsa -out /etc/haraka/config/dkim/use.25cent.cloud.key 2048 openssl rsa -in /etc/haraka/config/dkim/use.25cent.cloud.key \ -pubout -out /etc/haraka/config/dkim/use.25cent.cloud.pub # Extract the public key for DNS (remove header/footer, join lines) grep -v "^-" /etc/haraka/config/dkim/use.25cent.cloud.pub | tr -d '\n'
Add DNS record:
| Type | Name | Content |
|---|---|---|
TXT |
default._domainkey.use |
v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_HERE |
Already configured above. DMARC tells receiving servers what to do when SPF/DKIM fail.
v=DMARC1; p=none; rua=mailto:[email protected]
p=none — Monitor mode (no rejection). Change to p=quarantine or p=reject once stable.rua=mailto:... — Where aggregate reports are sent| Problem | Cause | Solution |
|---|---|---|
| Emails not arriving | MX record not set or proxied | Check dig MX use.25cent.cloud — should return mail.25cent.cloud. Ensure Cloudflare proxy is OFF. |
| Connection refused on port 25 | Port blocked or Haraka not running | Run sudo ufw status, check Haraka with pm2 status. Contact Hostinger if port 25 is ISP-blocked. |
| Emails bouncing with 550 | Inbox doesn't exist or expired | Verify the inbox is active. Check pm2 logs mail-server for webhook response codes. |
| Emails delayed (minutes/hours) | DNS propagation or greylisting | Wait for DNS propagation (up to 48h). Check if any spam filter is greylisting first-time senders. |
| Webhook returning 500 | API server issue | Check pm2 logs 25cent-api. Verify the API is running on port 3005. |
| "Host not found" when sending to @use.25cent.cloud | Missing A record for mail.25cent.cloud |
Add the A record pointing to 5.183.9.216 with proxy OFF. |
MX use → mail.25cent.cloud (priority 10, DNS only)A mail → 5.183.9.216 (DNS only)TXT use → v=spf1 ip4:5.183.9.216 a:mail.25cent.cloud ~allTXT _dmarc.use → v=DMARC1; p=none; rua=mailto:[email protected]