Juan Pablo Bagnon wrote:
> i need to control de message rate hitting my content filter server (CFS).
> 
> i have installed 2 instances of postfix
> 
> 1- recipient check, greylisting and holding mail
> 2- throttling to the content filter server.
> 
> i have followed the README file.
> i have inserted in throttle one line as advised in README file.
> 
> -> 3) Throttle by IP address
> 
> INSERT INTO throttle \
> (_from,_count_max,_quota_max,_time_limit,_mail_size,_date,_priority)
> VALUES ('IP_FROM_1st_POSTFIX_INSTANCE',      # from
> address
>          5,                # maximum messages per time unit
>          200000000,         # size in bytes
>          86400,             # time unit in seconds
>          100000000,          # maximum message size
>          UNIX_TIMESTAMP(),  # current time
>          5);               # priority of record
> 
> i want to archive this:
> 
> i want to rate to 5 massages over a minute from that IP
> 
> i dont care about recipients, just ip from the message came and message
> count.
> 
> is that posible?
> 
> now it works just the first time i run the /usr/local/policyd/policyd -c
> /usr/local/policyd/policyd.conf
> 
> im sending 100 emails the the same addr
> 
> throttle table is not changed
> triplet table has 1 record with:
> 
> _from  _rcpt  _host  _datenew  _datelast  _count
> [EMAIL PROTECTED] [EMAIL PROTECTED] 
> 1st_postfix_instance_ip(just 3
> octects) 1185294108 1185294108 0
> 
> it waits 8 minutes and send all the 100 emails.
> 
> what im doing wrong?
> is it needed 2 postfix instances or just 2 calls to 2 diff policyd
> instances, one on smtp_client_restrictions and the other in
> smtp_recipient_restrictions?

You best bet is to run 2 instances of policyd
Instance 1 - greylisting, etc.
Instance 2 - Throttling

Call them from the appropriate section.
Since you throttling by IP address, make sure your postfix restrictions 
are in the appropriate order.  ie. make sure policyd is called BEFORE 
any option that would permit that IP.

FYI, You can use the same database for both instances.

john

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
policyd-users mailing list
policyd-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/policyd-users

Reply via email to