Limit the incoming email rate in Postfix

posted: Saturday 27 February 2010 by Tavis J. Hampton in: Web Hosting VPS & Dedicated Software

Postfix logo
Question: I have spammers sending multiple email messages to my mail server. How can can I limit the number of emails they can send in a given amount of time?

Answer: This is a trick that many spammers and malicious hackers will use to flood your server with their nonsense. Although a spam blocker will certainly help, it still has to process each email. If thousands of emails are sent an hour, that takes up valuable CPU power, memory, disk space, and time.

Postfix mail server allows you to limit the rate of incoming emails, keeping the spam messages from flooding your server. To configure it, edit /etc/mail/main.cf:

# nano main.cf (or vi main.cf)

Add the following directives:

smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20

With these settings, after a client has made 10 connections, Postfix will pause and delay the next connection. If the connection is made 20 times without delivering mail, Postfix will disconnect.

Source: nixCraft

1 stelle2 stelle3 stelle4 stelle5 stelle (no votes)
share this 0 comments

Related posts

Server OS Tips del 30 Jul 2010
Server Backup Tips del 30 Jul 2010
Server Hardware Tips del 28 Jul 2010
Server Maintenance Tips del 28 Jul 2010

Related tags

Be the first to add a comment to this article.

Your email address is required but won't be displayed.
Leave a comment

Register to reserve your nickname accross all the blogs in the Blogo network and to upload your avatar. If you already are registered, login to user your nickname.

Yes No

Comment preview

Network Blogo