qmail on RHEL3, changing max messages sent per time period

I have a server running Red Hat Enterprise Linux 3. I've installed qmail (mostly following Life With Qmail and qmailrocks.org's advice and instructions). I have a few questions:

- I would like to limit how many messages any particular user/connection can send per minute (second, hour, whatever). I've looked through the qmail man pages and website(s) but haven't found a way to limit this. Should I be looking somewhere else?

- are there any SMTP test programs or sites that I can use to check my server (security-wise, effeciency, etc -- something like DNSreport.com but for SMTP).

Can I use some function within qmail itself, spamassasin or clam-av to limit the message rate from a particular client? (i.e., "client 10.10.10.1 can't send more than 50 messages within an hour's time").
LVL 9
David PiniellaAsked:
Who is Participating?
 
jrssystemsnetCommented:
Probably your best bet is to use traffic-shaping firewall functionality to accomplish your goal of limiting the number of sessions per [x] unit of time from any individual IP address - I don't know of any functionality within qmail or any of the associated services that could be used that way.

Worst come to worst, you could make iptables log all SMTP connections and use a watchdog script to monitor the logs and automatically blackhole IPs that go over your preset limits in terms of connections per minute or hour, send an administrative email to warn you, etc.
0
 
David PiniellaAuthor Commented:
thank you for your answer (hadn't thought of shaping the traffic via iptables), jrssystems
0
 
MaRiOsGRCommented:
Hello i have also Red Had Enterprise Linux 3 and qmail and i want to do the same thing,
to limit the email users to be able to send only 30 email per acccount per day.


I red what  jrssystemsnet  but im kinda newbie in linux...so
if  dpiniella did that ,can u help me do tha same ? :/
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
David PiniellaAuthor Commented:
the solution presented wouldn't really help you there. jrs is suggesting that I use iptables to limit the number of concurrent connections. iptables' --limit option will work for this but it works on a per second basis, not hourly or daily.
0
 
MaRiOsGRCommented:
damn... so is there any other way to protect the server from email abuse from inside clients ?
0
 
jrssystemsnetCommented:
MaRIOsGR - there is, but you should start your own question. =)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.