[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Etch + Postfix, limiting the sent emails per hour



Am Thursday, den 28 February hub Héctor González folgendes in die Tasten:

> George Dorobantu wrote:
> > postfix-policyd can't throttle in the way I need.
> > It can throttle based on "from" domain.
> > I need to throttle based on "to" domain because the remote servers
> > accept a certain rate per hour.
> >
> > George A. Dorobantu

> I think limiting NEW outgoing packets to port 25 in the firewall, with a
> rule for each remote server you need to throttle, could do the trick.

> something like:

> for maillimit in ip_limited_1 ip_limited_2; do
>   iptables -A OUTPUT -j ACCEPT -p tcp -d $maillimit -m state --state NEW
> -m limit --limit 200/hour
> done

Maybe hashlimit with dstip mode is more interesting as you do not have to
add a rule for every host.

> might work for you.  Don't know if you should close or reject the
> packets after the limit is set with this rule, or how that would affect
> the postfix queues.

Should not matter at first glance. If the connection is reset or
packets are simply thrown away should not matter for the MTA as boths
are like 4xxx errors.

Ciao
Max
-- 
	Follow the white penguin.


Reply to: