[Rspamd-Users] cyclic dependencies

Manuel Guesdon ml+rspamd at oxymium.net
Tue Jun 18 19:33:38 UTC 2019


On Mon, 17 Jun 2019 22:05:36 +0200
Manuel Guesdon <ml+rspamd at oxymium.net> wrote:

>| Hi,
>| 
>| I have a problem which makes me crazy :-(
>| 
>| rspamd 1.9.4
>| 
>| I have 2 modules:
>|   - OXYMIUM_SENDER_ALLOWED which should be called very soon in the task:
>| 
>| 
>| 	 local id = rspamd_config:register_symbol({
>| 						     name = 'OXYMIUM_SENDER_ALLOWED',
>| 						     type = 'callback',
>| 						     callback = sender_allowed_cb,
>| 						     priority = 0,
>| 						     no_squeeze = true,
>| 						     flags = 'prefilter,coro,fine,ignore_passthrough'
>| 						  })       
>| 	 --should run before these ones
>| 	 rspamd_config:register_dependency('DMARC_CALLBACK','OXYMIUM_SENDER_ALLOWED')
>| 	 rspamd_config:register_dependency('DKIM_SIGN','OXYMIUM_SENDER_ALLOWED')
>| 	 rspamd_config:register_dependency('DKIM_CHECK','OXYMIUM_SENDER_ALLOWED')
>| 	 rspamd_config:register_dependency('OXYMIUM_FINALIZE','OXYMIUM_SENDER_ALLOWED')
>| 
>| 	 -- force even if set_pre_result
>| 	 rspamd_config:add_symbol_flags('DKIM_SIGN',{'ignore_passthrough'})
>| 	 rspamd_config:add_symbol_flags('DKIM_SIGNED',{'ignore_passthrough'})
>| 	 rspamd_config:add_symbol_flags('DMARC_CALLBACK',{'ignore_passthrough'})
>| 	
>| 
>|   - OXYMIUM_FINALIZE which should be call near the end of the task:
>| 	 local id = rspamd_config:register_symbol({
>| 						     name = 'OXYMIUM_FINALIZE',
>| 						     type = 'callback',
>| 						     callback = finalize_cb,
>| 						     priority = -10,
>| 						     flags = 'coro,fine,ignore_passthrough',
>| 						     no_squeeze = true
>| 						  })       
>| 	 --should run after these ones
>| 	 rspamd_config:register_dependency('OXYMIUM_FINALIZE','DKIM_CHECK')
>| 	 rspamd_config:register_dependency('OXYMIUM_FINALIZE','DMARC_CALLBACK')
>| 	 rspamd_config:register_dependency('OXYMIUM_FINALIZE','ARC_CALLBACK')
>| 	 rspamd_config:register_dependency('OXYMIUM_FINALIZE','ARC_REJECT')
>| 	 --before these ones
>| 	 rspamd_config:register_dependency('ARC_SIGNED','OXYMIUM_FINALIZE')
>| 
>| Result: OXYMIUM_FINALIZE callback is always called before SPF and DKIM checks are finished.
>| Here logs which show: "cyclic dependencies: maximum check level 20 exceed
>| when checking dependencies for OXYMIUM_FINALIZE".
>| 
>| I don't see cyclic dependencies, only some modules which take some time (SPF one for example).
>| 
>|    If someone has an idea... 

=> https://github.com/rspamd/rspamd/issues/2930

Manuel 

--
______________________________________________________________________
Manuel Guesdon - OXYMIUM


More information about the Users mailing list