[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#470758: Does not reset current recursion level on new MAIL FROM

Package: libspf0
Version: 0.999-1.0.0-p3-3

Please have a look at #464029 for an example of the problem this causes.

Attached is a patch which fixes this within libspf (by resetting the
level in SPF_smtp_from()). I've tested it (together with the patch for
#392927) and it fixes the issue for me.

I am not simply reassigning the bug to libspf, because the library
maintainer/author might not think that changing its code is the correct
thing to do (and decide that the variable should be explicitly reset by
the library client). I have not been able to find any API documentation
which would support either view.

Also, it would be really nice if you could upload a fix for this and
#392927 to etch-proposed-updates...

Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216
--- libspf-0.999-1.0.0-p3.orig/src/libspf/main.c
+++ libspf-0.999-1.0.0-p3/src/libspf/main.c
@@ -1830,6 +1831,11 @@
   xvprintf("local-part: [%s]; domain: [%s]; sender: [%s]\n",
     p->local_part, p->current_domain, p->from);
+  /*
+   * We need to reset this, otherwise we'll hit the recursion limit after N rejected MAIL FROMs.
+   */
+  p->spf_rlevel = 0;

Reply to: