mail-services/manifests/raw-resources-mail-services/stalwart-loadbalancer-service.yaml

58 lines
1.4 KiB
YAML

---
# LoadBalancer Service for direct SMTP/IMAP access
# Use this if you have MetalLB or similar LoadBalancer provider
apiVersion: v1
kind: Service
metadata:
name: stalwart-mail-ports
namespace: mail
labels:
app: stalwart
annotations:
# If using MetalLB, you can request a specific IP
# metallb.universe.tf/loadBalancerIPs: 192.168.10.241
spec:
type: LoadBalancer
selector:
app: stalwart
ports:
# SMTP - Receiving mail from other servers
- name: smtp
port: 25
targetPort: 25
protocol: TCP
# SMTP Submission - Sending mail
- name: submission
port: 587
targetPort: 587
protocol: TCP
# SMTPS - Secure SMTP
- name: smtps
port: 465
targetPort: 465
protocol: TCP
# IMAPS - Secure IMAP
- name: imaps
port: 993
targetPort: 993
protocol: TCP
# IMAP - Plaintext IMAP
- name: imap
port: 143
targetPort: 143
protocol: TCP
---
# Instructions:
# 1. Apply this service: kubectl apply -f stalwart-loadbalancer-service.yaml
# 2. Get the LoadBalancer IP: kubectl get svc stalwart-mail-ports -n mail
# 3. If the IP is private (192.168.x.x), set up port forwarding from your router
# 4. Update DNS (turn OFF Cloudflare proxy):
# mail.dvirlabs.com A <your-public-ip> (gray cloud, not orange)
# 5. Add MX record:
# @ MX 10 mail.dvirlabs.com