• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SMTP proxying of NATted PCs


New Member

Messages: 6

The situation is quite simple: there is a LAN natted by a FreeBSD 7.0 machine that have a public IP assigned on one of its NIC. I want to filter/proxy SMTP (25 port) traffic that passes from LAN to WAN. I choose smtp-gated, I've installed this software from ports, but I'm getting the folowing error when I start smtp-gated

Cannot open .pid file [/var/run/smtp-gated/smtp-gated.pid]: No such file or directory

The directory /var/run/smtp-gated exists and it is owned by smtp-gated, the user specified in /etc/smtp-gated.conf

Do i need to create the specified .pid file ?

Thanks in advance


Staff member

Thanks: 2,620
Messages: 11,217

Why the proxy? Why not start a regular smtp server (Sendmail/Postfix, etc.) that listens on all interfaces, with a rule that allows relay access to your LAN IPs only? All your LAN users have to do is set the LAN IP address of the gateway as their outbound mailserver.


New Member

Messages: 6

thanks, DutchDaemon

I believed that the single solution to prevent sending spam from possible infected hosts behind NAT is using a software that has filter capabilities in combination with SpamAssassin and ClamAv.

Also, i thought that i can prevent sending spam by listing allowed senders that can use smtp session through gateway. All this is possible using a mail relay, as you said.