Zhang Huangbin wrote:
Hi, all.

Does blacklist_helo support wildcard in policyd-1.82?
if yes, what's the syntax for wildcard? use '%'?

Thanks very much.


Hello Zhang,


Policyd doesn't support wildcards on helo checking. I've had that same need a while ago, and i've been able to use it with a small change in the blacklist_helo.c file. I'm sending the patch in attachment, hoping that the devel team can consider it for inclusion on upcoming releases.

Regards,

Hugo Monteiro.

--
ci.fct.unl.pt:~# cat .signature

Hugo Monteiro
Email    : [EMAIL PROTECTED]
Telefone : +351 212948300 Ext.15307

Centro de Informática
Faculdade de Ciências e Tecnologia da
                   Universidade Nova de Lisboa
Quinta da Torre   2829-516 Caparica   Portugal
Telefone: +351 212948596   Fax: +351 212948548
www.ci.fct.unl.pt             [EMAIL PROTECTED]

ci.fct.unl.pt:~# _

--- policyd-1.82/blacklist_helo.c	2007-08-20 07:42:05.000000000 +0100
+++ policyd-1.80/blacklist_helo.c	2008-06-11 12:14:56.000000000 +0100
@@ -48,7 +48,7 @@
   
   /* build up query & execute*/
   snprintf(mysqlquery_array[fd], 512,
-    "SELECT COUNT(_helo) FROM blacklist_helo WHERE _helo='%s'", triplet_array[fd][5]);
+    "SELECT COUNT(_helo) FROM blacklist_helo WHERE '%s' LIKE _helo", triplet_array[fd][5]);
   if(db_optquery(fd) == -1) return(db_failure(fd, "blacklist_helo"));
 
   /* we have forged helo attempt */
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to