[OxLUG] Closing port 25 to external connections

Top Page
Delete this message
Reply to this message
Author: Tim Pizey
Date:  
To: Oxfordshire Linux User Group Discussion List
Subject: [OxLUG] Closing port 25 to external connections
Hi,

I have a server running RH 5 (?) circa 2000 which doesn't receive any valid incoming mail that I can discern,
but needs to be able to send mail to me and to itself.
It is receiving so much spam that the disks fill and the usage goes to 6.

It is running qmail, which cannot be configured to quietly drop mail.

So it was suggested that I close port 25 to incoming connections.

There is no mention of smptd in /etc/inetd.conf

/etc/services gives
smtp 25/tcp mail

It looks like we do not have iptables installed, but do have ipchains.
(both of which are as yet unknown to me).

Digging a bit further it seems we are using tcpserver and have quite possibly been running
as an open relay since 2000 as /etc/tcprules contained all:allow

So I have changed /etc/tcprules to read
127.:allow
!127.:deny
rebuilt the .cdb file:
tcprules /etc/tcprules.smtp.cdb /etc/tcprules.smtp.tmp < /etc/tcprules.smtp

and bravely restarted qmail.
but this has not stopped the receipt of spam :(

I think the thing to do might be to stop using tcpwrapper and use inetd,
suitably configured.

qmail seems to be hardwired with the idea that every message is sacred,
the idea that you would want to just chuck everything to /dev/null
is sacreligious, you must bounce it back to the poor sap whose email
address has been forged.

Enough for tonight, just going to stop qmail, so the deluge can sit on
someone else's machine until they bounce it or drop it.

cheers
TimP