docs: update Netgrimoire/Services/MailCow/Sample_Domain_Setup
This commit is contained in:
parent
3738f8f0fb
commit
4ac6a24acd
1 changed files with 98 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
title: Sample Domain Setup
|
||||
description: Graymutt@nucking-futz.com
|
||||
published: true
|
||||
date: 2026-02-25T22:02:27.719Z
|
||||
date: 2026-02-25T22:09:15.806Z
|
||||
tags:
|
||||
editor: markdown
|
||||
dateCreated: 2026-02-25T22:02:27.719Z
|
||||
|
|
@ -10,6 +10,103 @@ dateCreated: 2026-02-25T22:02:27.719Z
|
|||
|
||||
# Mail Setup — nucking-futz.com
|
||||
|
||||
## Part 0 — OPNsense: Configure ATT_Mail Secondary IP
|
||||
|
||||
Before configuring DNS or Mailcow, the secondary AT&T static IP must be configured in OPNsense as a virtual IP on the WAN interface and NAT rules must be set so only raw SMTP traffic (ports 25, 465, 587, 993, 143) uses this address. Webmail, the Mailcow admin UI, and all other traffic continue to use the primary WAN IP (107.133.34.145).
|
||||
|
||||
| Address | Purpose |
|
||||
|---------|---------|
|
||||
| 107.133.34.145 | Primary WAN — web, admin, everything else |
|
||||
| 107.133.34.146 | ATT_Mail — SMTP/IMAP inbound and outbound only |
|
||||
|
||||
### Step 0.1 — Add Virtual IP
|
||||
|
||||
1. Go to **Interfaces → Virtual IPs → Settings**
|
||||
2. Click **+ Add**
|
||||
3. Set the following:
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Mode | IP Alias |
|
||||
| Interface | WAN (igc1) |
|
||||
| Network / Address | `107.133.34.146 / 28` |
|
||||
| Description | `ATT_Mail` |
|
||||
|
||||
4. Click **Save**, then **Apply changes**
|
||||
|
||||
> The /28 subnet mask matches the AT&T block (107.133.34.144/28). All 5 static IPs in the block share this mask.
|
||||
|
||||
### Step 0.2 — Outbound NAT for SMTP Traffic
|
||||
|
||||
This ensures Mailcow's outbound SMTP connections leave through the ATT_Mail IP rather than the primary WAN IP. OPNsense must be in **Hybrid** or **Manual** outbound NAT mode.
|
||||
|
||||
1. Go to **Firewall → NAT → Outbound**
|
||||
2. Confirm mode is set to **Hybrid Outbound NAT** (or Manual — either works)
|
||||
3. Click **Add** to create a new rule
|
||||
|
||||
**Rule for outbound SMTP (port 587 relay to MXRoute):**
|
||||
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Interface | WAN |
|
||||
| TCP/IP Version | IPv4 |
|
||||
| Protocol | TCP |
|
||||
| Source | `192.168.5.16 / 32` (Mailcow host) |
|
||||
| Source Port | any |
|
||||
| Destination | any |
|
||||
| Destination Port | 587 |
|
||||
| Translation / Target | `107.133.34.146` (ATT_Mail) |
|
||||
| Description | `Mailcow outbound relay via ATT_Mail` |
|
||||
|
||||
4. Repeat for port **25** (direct outbound SMTP, if used) and port **465** (SMTPS)
|
||||
5. Click **Save** and **Apply changes**
|
||||
|
||||
### Step 0.3 — Inbound NAT (Port Forwards) for Mail Ports
|
||||
|
||||
Route inbound connections on mail ports to Mailcow using the ATT_Mail IP as the external address.
|
||||
|
||||
1. Go to **Firewall → NAT → Port Forward**
|
||||
2. Create rules for each mail port:
|
||||
|
||||
| External IP | Port(s) | Forward to | Description |
|
||||
|-------------|---------|-----------|-------------|
|
||||
| 107.133.34.146 | 25 | 192.168.5.16:25 | SMTP inbound |
|
||||
| 107.133.34.146 | 465 | 192.168.5.16:465 | SMTPS inbound |
|
||||
| 107.133.34.146 | 587 | 192.168.5.16:587 | Submission inbound |
|
||||
| 107.133.34.146 | 993 | 192.168.5.16:993 | IMAPS |
|
||||
| 107.133.34.146 | 143 | 192.168.5.16:143 | IMAP (if needed) |
|
||||
|
||||
> **Do not** add port forwards for 80, 443, or 3443 (Mailcow admin/webmail ports) on this IP. Those remain on the primary WAN IP via Caddy.
|
||||
|
||||
3. Click **Save** and **Apply changes**
|
||||
|
||||
### Step 0.4 — Firewall Rules
|
||||
|
||||
Ensure the WAN firewall rules permit inbound traffic on the mail ports to the ATT_Mail IP. If you have a default deny-all WAN rule (recommended), add explicit pass rules:
|
||||
|
||||
1. Go to **Firewall → Rules → WAN**
|
||||
2. Add pass rules for each port in the table above with destination `107.133.34.146`
|
||||
|
||||
### Step 0.5 — Verify
|
||||
|
||||
```bash
|
||||
# From outside your network, confirm the mail IP is live
|
||||
telnet 107.133.34.146 25
|
||||
# Should see: 220 hermes.netgrimoire.com ESMTP
|
||||
|
||||
# Confirm primary WAN IP does NOT respond on port 25
|
||||
telnet 107.133.34.145 25
|
||||
# Should time out or be refused
|
||||
|
||||
# Check that Mailcow outbound connections leave from the ATT_Mail IP
|
||||
# Send a test to check-auth@verifier.port25.com and inspect the Return-Path
|
||||
# or check the Received: header — the sending IP should be 107.133.34.146
|
||||
```
|
||||
|
||||
> ⚠ If the verify step shows port 25 still responding on 107.133.34.145, check that no leftover port forward rules exist on the primary WAN IP for mail ports.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This guide covers complete mail setup for `nucking-futz.com` using MXRoute as the inbound gateway and Mailcow as the mailbox host. MXRoute receives all inbound mail from the internet (solving residential IP filtering issues with banks and financial institutions) and forwards to Mailcow for storage and retrieval. Mailcow handles outbound mail via the MXRoute SMTP relay.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue