[Rspamd] Add neural module and define its scores
This commit is contained in:
		
							
								
								
									
										28
									
								
								data/conf/rspamd/local.d/neural.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								data/conf/rspamd/local.d/neural.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					rules {
 | 
				
			||||||
 | 
					  "LONG" {
 | 
				
			||||||
 | 
					    train {
 | 
				
			||||||
 | 
					      max_trains = 800;
 | 
				
			||||||
 | 
					      max_usages = 20;
 | 
				
			||||||
 | 
					      max_iterations = 25;
 | 
				
			||||||
 | 
					      learning_rate = 0.01,
 | 
				
			||||||
 | 
					      spam_score = 9;
 | 
				
			||||||
 | 
					      ham_score = -4;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    symbol_spam = "NEURAL_SPAM_LONG";
 | 
				
			||||||
 | 
					    symbol_ham = "NEURAL_HAM_LONG";
 | 
				
			||||||
 | 
					    ann_expire = 100d;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  "SHORT" {
 | 
				
			||||||
 | 
					    train {
 | 
				
			||||||
 | 
					      max_trains = 90;
 | 
				
			||||||
 | 
					      max_usages = 2;
 | 
				
			||||||
 | 
					      max_iterations = 25;
 | 
				
			||||||
 | 
					      learning_rate = 0.02,
 | 
				
			||||||
 | 
					      spam_score = 9;
 | 
				
			||||||
 | 
					      ham_score = -4;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    symbol_spam = "NEURAL_SPAM_SHORT";
 | 
				
			||||||
 | 
					    symbol_ham = "NEURAL_HAM_SHORT";
 | 
				
			||||||
 | 
					    ann_expire = 7d;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										18
									
								
								data/conf/rspamd/local.d/neural_group.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								data/conf/rspamd/local.d/neural_group.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					symbols = {
 | 
				
			||||||
 | 
					  "NEURAL_SPAM_LONG" {
 | 
				
			||||||
 | 
					    weight = 4.2; # sample weight
 | 
				
			||||||
 | 
					    description = "Neural network spam (long)";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  "NEURAL_HAM_LONG" {
 | 
				
			||||||
 | 
					    weight = -4.0; # sample weight
 | 
				
			||||||
 | 
					    description = "Neural network ham (long)";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  "NEURAL_SPAM_SHORT" {
 | 
				
			||||||
 | 
					    weight = 3.0; # sample weight
 | 
				
			||||||
 | 
					    description = "Neural network spam (short)";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  "NEURAL_HAM_SHORT" {
 | 
				
			||||||
 | 
					    weight = -2.0; # sample weight
 | 
				
			||||||
 | 
					    description = "Neural network ham (short)";
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user