[milters] Archive

Lists Index Date Thread Search

Article: 2858
From: Anthony Howe
Date: 2012-03-21 07:57:27 -0400
Subject: Re: milter-limit: processing order of the same rule w/

On 19 Mar 2012 09:50, Jahnke-Zumbusch, Dirk whispered from the shadows...:
> Hi all,
> I am experimenting in limiting our outgoing mails. I could not figure
> out, if something like the following is possible:
> milter-limit-From:              500/1m
> milter-limit-From:              600/15m
> milter-limit-From:              700/1h
> that is, if some sender has some kind of bursty traffic from time to time, 
> this is perfectly o.k., but there should be no sustained high rate of e-mails.
> O.K., I get a "duplicate key" error by makemap.

You can only have ONE default value per empty tag.

If you are using same MTA in and out then the above would apply in both
directions. If you are controlling outbound traffic, then its better to
be more specific in your limits. For example:

	milter-limit-connect:192.168	100/1m
	milter-limit-connect:10		100/1m
	milter-limit-connect:		20/1m

Note the lookups are made from most specific to least specific, same
applies for -From and -To. Pattern lists are possible for some special
use cases.

> I could setup a chain of Postfix queues with different milter instances for 
> each queue. But perhaps there is something more elegant I am just not able
> to see?

Depends on how you want the object complete picture is. Multiple milters
with different access-db settings is possible, but I suspect that is
overkill. Picking the proper left-hand-side value should be sufficient
and in some cases using a pattern list if you need finer granularity:

	milter-limit-from:freddy.krugger@aol.com	1/m
	milter-limit-from:aol.com	30/m

Remember that all the milter-limit tags (-To, -From, -Connect, etc.)
have a precedence order.

Anthony C Howe            Skype: SirWumpus                  SnertSoft
                        Twitter: SirWumpus      BarricadeMX & Milters
http://snert.com/      http://nanozen.info/     http://snertsoft.com/

Lists Index Date Thread Search