64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
---
|
|
# NodePort Service for direct SMTP/IMAP access
|
|
# Use this if you have a public IP and can port-forward
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: stalwart-external
|
|
namespace: mail-services
|
|
labels:
|
|
app: stalwart
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: stalwart
|
|
ports:
|
|
# SMTP - Receiving mail from other servers
|
|
- name: smtp
|
|
port: 25
|
|
targetPort: 25
|
|
nodePort: 30025 # Expose on node port 30025
|
|
protocol: TCP
|
|
|
|
# SMTP Submission - Sending mail
|
|
- name: submission
|
|
port: 587
|
|
targetPort: 587
|
|
nodePort: 30587
|
|
protocol: TCP
|
|
|
|
# SMTPS - Secure SMTP
|
|
- name: smtps
|
|
port: 465
|
|
targetPort: 465
|
|
nodePort: 30465
|
|
protocol: TCP
|
|
|
|
# IMAPS - Secure IMAP
|
|
- name: imaps
|
|
port: 993
|
|
targetPort: 993
|
|
nodePort: 30993
|
|
protocol: TCP
|
|
|
|
# IMAP - Plaintext IMAP
|
|
- name: imap
|
|
port: 143
|
|
targetPort: 143
|
|
nodePort: 30143
|
|
protocol: TCP
|
|
|
|
---
|
|
# Instructions:
|
|
# 1. Apply this service: kubectl apply -f stalwart-nodeport-service.yaml
|
|
# 2. Forward ports from your router/firewall to your k3s node:
|
|
# - 25 → <node-ip>:30025
|
|
# - 587 → <node-ip>:30587
|
|
# - 465 → <node-ip>:30465
|
|
# - 993 → <node-ip>:30993
|
|
# - 143 → <node-ip>:30143
|
|
# 3. Update DNS (turn OFF Cloudflare proxy):
|
|
# mail.dvirlabs.com A <your-public-ip> (gray cloud, not orange)
|
|
# 4. Add MX record:
|
|
# @ MX 10 mail.dvirlabs.com
|