Greetings everyone,
First time posting here and so bear with me please :)
I have a mail server I don't want to touch; I want to set up another machine in front of it running spamd. I have tried using `rdr-to` instead of `divert-to` but neither seem to work
This is what my pf rules look like in "/etc/pf.conf"
```
table <spamd-white> persist
table <nospamd> persist file "/etc/mail/nospamd"

# Incoming connections that are whitelisted/nospamd go directly to the smtp server pass in quick log (all, to pflog0) on egress proto tcp from { <nospamd> <spamd-white> } \
to any port smtp divert-to mailserver.domain.com port smtp

# Divert unknown tcp connections with destination port 25 to spamd
pass in quick log (all, to pflog0) on egress proto tcp from any to any port smtp divert-to 127.0.0.1 port spamd
```
I have enabled packet forwarding with `doas sysctl net.inet.ip.forwarding: 0 -> 1`

I am using `nc` to test my connection with the real smtp server through the antispam server but I am getting connection timeout every time. When I check the logs, I can see the client sends a first SYN packets to the antispam and from there the packets get forwarded to the smtp server, but I don’t see any replies from the smtp server. There are no rules on the smtp server blocking the connections from my client and this is all done locally.
Can anyone help me? Any ideas as of why my set up is not working?

Reply via email to