xwpyltdyoapacheorg author mmartinec date tue oct 16 170448 2007 new revision 585292 url httpsvnapacheorgviewvcrev585292viewrev log asyncloop replaces sharp clipping lower timeout value smooth quadratic transition curve initial minimal timeout value updated documentation accordingly adjust actual timeout value timer resolution ceiling timehires module available confasyncloop configuration variable rbl_timeout add two optional parameters minimal timeout value zone name timeout specification apply specified zone subdomains update documentation accordingly modified spamassassintrunklibmailspamassassinasynclooppm spamassassintrunklibmailspamassassinconfpm spamassassintrunklibmailspamassassindnspm spamassassintrunklibmailspamassassinpluginasnpm spamassassintrunklibmailspamassassinpluginuridnsblpm modified spamassassintrunklibmailspamassassinasynclooppm url httpsvnapacheorgviewvcspamassassintrunklibmailspamassassinasynclooppmrev585292r1585291r2585292viewdiff spamassassintrunklibmailspamassassinasynclooppm original spamassassintrunklibmailspamassassinasynclooppm tue oct 16 170448 2007 458 4515 load timehires available begin eval require timehires timehiresimport qwtime unless use vars qwtimer_resolution eval require timehires die error loading timehires timehiresimport qwtime clock_realtime timer_resolution timehiresclock_getresclock_realtime 1 timer_resolution 1 perls builtin timer ticks one second 12327 13033 code reference called one argument cent object item zone optional zone specification typically dns zone name eg host domain rbl used key look perzone settings currently timeouts item timeout_initial optional initial value elapsed time willing wait response time seconds floating point value allowed elapsed time since query started exceeds timeout value queries wait query aborted actual timeout value may shrink dynamically factor timeout_initial value factor derived number queries already completed value fall timeout_min see next parameter queries wait query aborted actual timeout value ranges timeout_initial gradually approaches timeout_min see next parameter number already completed queries approaches number queries started caller explicitly provide parameter value undefined default initial timeout value settable configuration variable rbl_timeout value timeout_initial parameter already timeout_min pushed timeout_min value timeout_initial parameter timeout_min initial timeout set timeout_min item timeout_min optional lower bound seconds timeout value reduced dynamic timeout shrinkage formula defaults 1 second lower bound seconds actual timeout approaches number queries completed approaches number queries started defaults 02 timeout_initial back 16411 17740 entstatus started entstart_time defined entstart_time enttimeout_min 1 defined enttimeout_min limits shrinkage timeout enttimeout_initial timeout selfmainconfrbl_timeout defined timeout timeout enttimeout_min timeout enttimeout_min enttimeout_initial timeout applicable perzone settings zone entzone settings ref byzone global settings conf_by_zone selfmainconfby_zone defined zone conf_by_zone dbgasync searching by_zone settings zone zone zone sz strip leading trailing dot 210examplecom 10examplecom examplecom com exists conf_by_zonezone settings conf_by_zonezone dbgasync applying by_zone settings zone last elsif zone eq last else strip one level careful address literals zone zone zxs 2 t_init enttimeout_initial applicationspecified precedence t_init settingsrbl_timeout settings defined t_init t_init selfmainconfrbl_timeout defined t_init t_init 0 defined t_init lastresort default case t_end enttimeout_min applicationspecified precedence t_end settingsrbl_timeout_min settings defined t_end t_end 02 t_init defined t_end t_end 0 t_end 0 case t_init t_end t_init t_end enttimeout_initial t_init enttimeout_min t_end entdisplay_id identifies entry debug logging similar join grep defined 26528 30729 defined timeout timeout 0 pending selftotal_queries_started 0 shrink select timeout caller specified unnecessarily long value beyond latest deadline outstanding request shrink select timeout caller specified unnecessarily long value beyond latest deadline outstanding request save needless wait time 1 second harvest_dnsbl_queries timeout_shrink_factor 1 07 selftotal_queries_completed selftotal_queries_started 2 r selftotal_queries_completed selftotal_queries_started r2 r r 01 max_deadline mykeyent pending dt enttimeout_initial timeout_shrink_factor dont shrink timeouts lower bound dt enttimeout_min dt enttimeout_min t_init enttimeout_initial dt t_init t_init enttimeout_min r2 deadline entstart_time dt defined max_deadline deadline max_deadline max_deadline deadline max_deadline deadline deadline max_deadline sufficient_timeout max_deadline sufficient_timeout 0 sufficient_timeout 0 defined max_deadline timeout sufficient_timeout dbgasync reducing select timeout 1f 1f timeout sufficient_timeout timeout sufficient_timeout defined max_deadline adjust timer resolution deals 1s fine resolution max_deadline 1 int max_deadline timer_resolution 1 max_deadline int max_deadline sufficient_timeout max_deadline sufficient_timeout 0 sufficient_timeout 0 timeout sufficient_timeout dbgasync reducing select timeout 1f 1f timeout sufficient_timeout timeout sufficient_timeout 33418 37716 pending still requests outstanding expired timeout_shrink_factor r allow_aborting_of_expired selftotal_queries_started 10 1 07 selftotal_queries_completed selftotal_queries_started 2 dbgasync timeout shrink factor 2f timeout_shrink_factor timeout_shrink_factor 1 selftotal_queries_completed selftotal_queries_started r2 r r 01 mykeyent pending typecountenttype dt enttimeout_initial timeout_shrink_factor dont shrink timeouts lower bound dt enttimeout_min dt enttimeout_min t_init enttimeout_initial dt t_init t_init enttimeout_min r2 adjust timer resolution deals 1s fine resolution dt 1 int dt timer_resolution 1 dt int dt allexpired 0 entstart_time dt dbgasync queries completed started modified spamassassintrunklibmailspamassassinconfpm url httpsvnapacheorgviewvcspamassassintrunklibmailspamassassinconfpmrev585292r1585291r2585292viewdiff spamassassintrunklibmailspamassassinconfpm original spamassassintrunklibmailspamassassinconfpm tue oct 16 170448 2007 244425 244435 item rbl_timeout n default 15 item rbl_timeout t_min zone default 15 3 dns queries made beginning check try read results end value specifies maximum period time wait dns query dns queries succeeded particular message spamassassin wait full period avoid wasting time unresponsive servers default 15 second timeout chart queries remaining versus effective timeout seconds queries left 100 90 80 70 60 50 40 30 20 10 0 timeout 15 15 14 14 13 11 10 8 5 3 0 addition whenever effective timeout lowered due additional query results returning remaining queries always given least one second timing wait time never exceed rbl_timeout example 20 queries made beginning message check 16 queries returned leaving 20 remaining 4 queries must finish within 5 seconds beginning check timed dns queries made beginning check try read results end value specifies maximum period time seconds wait dns query dns queries succeeded particular message spamassassin wait full period avoid wasting time unresponsive servers shrink timeout according percentage queries already completed number queries remaining approaches 0 timeout value gradually approach t_min value optional second parameter defaults 02 smaller t_min initial timeout set t_min chart queries remaining versus timeout seconds default 15 second 3 second timeout setting queries left 100 90 80 70 60 50 40 30 20 10 0 timeout 15 149 145 139 131 120 107 91 73 53 3 example 20 queries made beginning message check 16 queries returned leaving 20 remaining 4 queries finish within 73 seconds since query started timed note timed queries aborted nothing else left spamassassin long evaluation rules may grant queries additional time parameter zone specified must end letter distinguishes numeric parametrs setting applies dns queries specified dns domain host domain rbl subzone matching caseinsensitive actual domain may subdomain specified zone cut 24707 248029 setting rbl_timeout is_admin 1 default 15 type conf_type_numeric code sub self key value line _ unless defined value value return missing_required_value local 123 unless value azaz xs return invalid_value zone 3 defined zone global setting selfrbl_timeout 10 selfrbl_timeout_min 20 defined 2 else perzone settings zone zone strip leading trailing dot zone lc zone selfby_zonezonerbl_timeout 10 selfby_zonezonerbl_timeout_min 20 defined 2 item util_rb_tld tld1 tld2 modified spamassassintrunklibmailspamassassindnspm url httpsvnapacheorgviewvcspamassassintrunklibmailspamassassindnspmrev585292r1585291r2585292viewdiff spamassassintrunklibmailspamassassindnspm original spamassassintrunklibmailspamassassindnspm tue oct 16 170448 2007 1107 1107 ent key key timeout_initial selfconfrbl_timeout zone host serves fetch perzone settings type dnsbltype sets filled rules filled 1597 1597 ent key key timeout_initial selfconfrbl_timeout zone host serves fetch perzone settings type dnsbltype rules rule id filled send query modified spamassassintrunklibmailspamassassinpluginasnpm url httpsvnapacheorgviewvcspamassassintrunklibmailspamassassinpluginasnpmrev585292r1585291r2585292viewdiff spamassassintrunklibmailspamassassinpluginasnpm original spamassassintrunklibmailspamassassinpluginasnpm tue oct 16 170448 2007 21315 21316 dns query callback process result rather poll later zone_index index zone reversed_ip_quad entryzone key asnlookupzone_indexentryzone id scannermainresolverbgsendreversed_ip_quadentryzone txt undef sub id scannermainresolverbgsendzone txt undef sub pkt id timestamp _ scannerasyncset_response_packetid pkt key timestamp selfprocess_dns_resultscanner pkt zone_index ent keykey idid typetxt timeout defaults scannerconfrbl_timeout zone zone serves fetch perzone settings scannerasyncstart_lookupent dbgasn launched dns txt query ss background modified spamassassintrunklibmailspamassassinpluginuridnsblpm url httpsvnapacheorgviewvcspamassassintrunklibmailspamassassinpluginuridnsblpmrev585292r1585291r2585292viewdiff spamassassintrunklibmailspamassassinpluginuridnsblpm original spamassassintrunklibmailspamassassinpluginuridnsblpm tue oct 16 170448 2007 4717 4717 return scannerasyncget_lookupkey dig dom ns ent selfstart_lookupscanner ns ent selfstart_lookupscanner dom ns selfres_bgsendscanner dom ns key key entobj obj 5177 5177 return scannerasyncget_lookupkey dig hname ent selfstart_lookupscanner ent selfstart_lookupscanner hname selfres_bgsendscanner hname key key entobj obj 5627 5627 item lookupstrdnsbl dig ip txt ent selfstart_lookupscanner dnsbl ent selfstart_lookupscanner item dnsbl selfres_bgsendscanner item qtype key key entobj obj 65011 65011 sub start_lookup self scanner type id key _ self scanner zone type id key _ ent key key timeout_initial scannerconfrbl_timeout zone zone serves fetch perzone settings type uritype id id completed_callback sub wed 06 aug 2008 145043 0000 svn commit r585292 spamassassintrunklibmailspamassassin asynclooppm confpm dnspm pluginasnpm pluginuridnsblpm