Email Forwarding
Email forwarding turns Forge into an inbound mail receiver. Point your domain’s MX records at your Forge server, create forwarding rules, and email sent to @yourdomain.com lands in your personal inbox.
How It Works
Section titled “How It Works”External sender │ │ SMTP (port 25) ▼┌──────────────────────────┐│ Forge Inbound SMTP ││ (smtp-server + mailparser)││ ││ 1. Receives raw email ││ 2. SPF check on sender ││ 3. Spam scoring ││ 4. Matches forward rule ││ 5. Re-wraps & relays │└──────────┬───────────────┘ │ ▼┌──────────────────────────┐│ Forge Outbound SMTP ││ (nodemailer) ││ ││ Forwards to: ││ me@gmail.com │└──────────────────────────┘Forge is a mail relay, not a mail server. It receives, filters, and forwards. It does not store email (beyond logs) or provide IMAP/POP3 access. Your destination inbox (Gmail, Proton, Fastmail) handles storage, search, and replies.
Prerequisites
Section titled “Prerequisites”1. Enable inbound email
Section titled “1. Enable inbound email”# In your Forge .env:FORGE_EMAIL_INBOUND_ENABLED=trueFORGE_EMAIL_INBOUND_PORT=25 # 25 for production, 2525 for testingRestart Forge.
2. Open port 25
Section titled “2. Open port 25”sudo ufw allow 25/tcpSome VPS providers block port 25 by default. You may need to request unblocking:
- Hetzner: Unblocked by default
- DigitalOcean: Open a support ticket
- AWS Lightsail/EC2: Port 25 is permanently restricted — use SES instead
- Linode: Open a support ticket
3. Configure DNS
Section titled “3. Configure DNS”Add MX records to your domain:
Type Name Value PriorityMX mail.yourdomain.com forge.yourserver.com. 10A forge.yourserver.com YOUR_VPS_IP -TXT mail.yourdomain.com "v=spf1 mx -all" (SPF record)Replace forge.yourserver.com with the hostname pointing to your Forge server, and YOUR_VPS_IP with the actual IP.
Creating Forwarding Rules
Section titled “Creating Forwarding Rules”Go to System Settings → Email → Forwards → Add Forward.
Exact Match
Section titled “Exact Match”Source: support@yourdomain.comDestination: me@gmail.comSpam filter: StandardEmails to support@yourdomain.com are forwarded to me@gmail.com.
Wildcard (Catch-All)
Section titled “Wildcard (Catch-All)”Source: *@yourdomain.comDestination: me@gmail.comSpam filter: StandardAny email to @yourdomain.com that doesn’t match an exact rule is forwarded to me@gmail.com. Only one wildcard per identity — create it last.
Rule Priority
Section titled “Rule Priority”Exact matches are checked first. The wildcard (if any) is checked last. If no rule matches, the email is silently dropped (not bounced, to avoid backscatter spam).
Spam Filtering
Section titled “Spam Filtering”Forge scores every inbound email from 0–100:
| Signal | Check |
|---|---|
| SPF validation | Did the sender’s IP match the domain’s SPF record? |
| Reverse DNS | Does the sender’s IP have a PTR record? |
| DNS blacklists | Is the sender IP on Spamhaus or similar DNSBL? (configurable) |
| Header heuristics | Missing Message-ID, malformed Date, mismatched From |
| Content signals | Known spam patterns in subject and body |
Threshold modes:
| Mode | Score threshold | Behavior |
|---|---|---|
| Off | N/A | Forward everything — no spam filtering |
| Standard (default) | 60+ | Drop if score exceeds 60 |
| Strict | 35+ | Drop if score exceeds 35 |
Set the mode per forwarding rule in the dashboard.
Inbound Log
Section titled “Inbound Log”The Inbound Log tab shows all received emails:
| Column | Description |
|---|---|
| From | Sender address |
| To | Recipient address (the forwarding address) |
| Subject | Email subject |
| Spam Score | 0–100 spam probability |
| Action | forwarded or dropped |
| Time | When the email was received |
Dropped emails are logged with their spam score — useful for tuning thresholds or investigating false positives.
Attachments
Section titled “Attachments”Inbound emails with attachments are forwarded with attachments intact (up to 25 MB total message size). Forge does not scan or modify attachment content.
Replies
Section titled “Replies”Replies to forwarded emails go to the original sender, not to Forge. The Reply-To header is preserved from the original email. Forge does not rewrite headers.
To reply from your custom domain address (e.g., support@yourdomain.com), configure that address as a “Send mail as” alias in Gmail or your email client, using your SMTP server credentials.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Max inbound message size | 25 MB |
| Inbound rate limit | 600 emails/minute per identity |
| Max forwarding rules per identity | 50 |
| Port (production) | 25 |
| Port (development) | 2525 |
Troubleshooting
Section titled “Troubleshooting”| Problem | Likely cause | Fix |
|---|---|---|
| Emails not arriving | DNS MX records not propagated | Check with dig MX yourdomain.com. Wait up to 48 hours for DNS propagation. |
| Port 25 connection refused | VPS blocks port 25 | Use FORGE_EMAIL_INBOUND_PORT=2525 for testing, or request unblock from VPS provider. |
| All emails dropped as spam | Spam threshold too strict | Lower threshold or set mode to “Off” temporarily to check if emails are arriving. |
| Forwarded email not in inbox | Destination spam filter | Check Gmail/Proton spam folder. Whitelist noreply@forge.yourserver.com. |
| SPF validation fails | Missing SPF record | Add "v=spf1 mx -all" TXT record to your domain. |