pkgsrc-Users archive

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

mail/postfix: blocklist support patches break building without blocklist



Hi,

postfix currently fails to build on my hosts, the linker cannot find a
pfilter_notify() function.

    smtpd.o: In function `smtpd_proto':
    smtpd.c:(.text+0x5594): undefined reference to `pfilter_notify'

In src/smtpd/pfilter.c and src/smtpd/pfilter.h, #ifdef's guard around
the availability of blocklist.h and blacklist.h.

But in the patch that adds an invocation of pfilter_notify() to
src/smtpd/smtpd.c such #ifdef's are missing:

@@ -5804,6 +5806,8 @@ static void smtpd_proto(SMTPD_STATE *sta
                   || strcmp(state->reason, REASON_LOST_CONNECTION)) {
            msg_info("%s after %s from %s",
                     state->reason, state->where, state->namaddr);
+           if (strcmp(state->where, SMTPD_CMD_AUTH) == 0)
+               pfilter_notify(1, vstream_fileno(state->client));
        }
     }

Patch is attached.


Regards
Matthias Ferdinand
$NetBSD: patch-src_smtpd_smtpd.c,v 1.1 2021/07/26 15:38:10 taca Exp $

Add blocklist(3) support.

--- src/smtpd/smtpd.c.orig	2021-07-24 21:43:57.000000000 +0000
+++ src/smtpd/smtpd.c
@@ -1262,6 +1262,7 @@
 #include <smtpd_proxy.h>
 #include <smtpd_milter.h>
 #include <smtpd_expand.h>
+#include "pfilter.h"
 
  /*
   * Tunable parameters. Make sure that there is some bound on the length of
@@ -5804,6 +5805,10 @@ static void smtpd_proto(SMTPD_STATE *sta
 		   || strcmp(state->reason, REASON_LOST_CONNECTION)) {
 	    msg_info("%s after %s from %s",
 		     state->reason, state->where, state->namaddr);
+#if defined(HAVE_BLOCKLIST) || defined(HAVE_BLACKLIST)
+	    if (strcmp(state->where, SMTPD_CMD_AUTH) == 0)
+		pfilter_notify(1, vstream_fileno(state->client));
+#endif
 	}
     }
 


Home | Main Index | Thread Index | Old Index