Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Limit message size and number of recipients at the same time

2011-11-22 by manu@netbsd.org

MARENTXU <maren.zubizarreta@...> wrote:

> But I don´t see where should I limit the size of the messages, I read
> somewhere  that you can use msgsize in a dacl rule, but I don´t see how
> to merge both.

I just had a look at the code, and it is indeed possible, though I did
not remember implementing it: you can ratelimit sessions, recipients or
bytes.

The rules would by like this (not tested, this is a wild guess):

list "USERS" addr { 158.227.4.29/16 }
ratelimit "MESSAGES_PER_HOUR" rcpt 200 / 1h key "%f%i"
ratelimit "BYTES_PER_HOUR" data 500M / 1h key "%f%i"

racl blacklist list "USERS" ratelimit "MESSAGES_PER_HOUR" \
    msg "LIMIT_1H. You have passed the recipient limit".
dacl blacklist list "USERS" ratelimit "BYTES_PER_HOUR" \
    msg "LIMIT_1H. You have passed the bytes limit".

Of course it works even beter if you use authenticated SMTP and have the
User identity in the key.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.