Hello,

Maksim Rodin <[email protected]> wrote:
> Hello,
> After some OS and packages upgrade I found out that my OpenSMTPD test mail
> server immediately crashes when a connection to its port 25 is established.
> For now it is OpenBSD 7.9 amd64 stable with OpenSMTPD is 7.9.0 with all
> patches applied.
> 
> The relevant smtpd.conf part is here (which worked once):
> ```
> filter "spamassassin" proc-exec "filter-spamassassin"
> filter mailfilter chain { dkimsign_rsa senderscore spamassassin }
> ```
> 
> The following needed packages were installed:
> # pkg_info | grep spam
> opensmtpd-filter-spamassassin-0.8 Apache SpamAssassin integration to the 
> OpenSMTPD daemon
> p5-Mail-SpamAssassin-4.0.2 mailfilter to identify and mark spam
> 
> What I see in the maillog when a connection to port 25 is established
> (it might be even just nc localhost 25):
> ```
> Nov  4 10:54:42 mail smtpd[97270]: info: OpenSMTPD 7.9.0 starting
> Nov  4 10:54:42 mail smtpd[66066]: queue: queue compression enabled
> Nov  4 10:54:42 mail filter-spamassassin[46280]: start 
> Nov  4 10:54:42 mail filter-spamassassin[46280]: register 
> Nov  4 10:54:50 mail smtpd[99241]: 7f8e6cc30a52a16b smtp connected 
> address=192.168.1.150 host=<unknown>
> Nov  4 10:54:50 mail filter-spamassassin[46280]: 7f8e6cc30a52a16b protocol 
> report 0.8 
> Nov  4 10:54:50 mail filter-spamassassin[46280]: exit 
> Nov  4 10:54:50 mail smtpd[53446]: warn: lost processor: spamassassin exited 
> abnormally
> Nov  4 10:54:50 mail smtpd[53446]: Exiting
> ```
> 
> Is it something I can debug and fix myself or does it require some patch
> as it was similarly in 2023?
> https://marc.info/?l=openbsd-misc&m=169955054128648&w=2

Ooops, good catch.  I even okay'd the diff to bump the protocol and
missed spamassassin again T.T

The diff is basically the same as before, I'm appending it here, I'm
going to post it to ports@ and get it committed and backported.

Thanks!


Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/opensmtpd-filters/spamassassin/Makefile,v
diff -u -p -r1.10 Makefile
--- Makefile    17 Apr 2024 17:10:12 -0000      1.10
+++ Makefile    4 Nov 2026 10:08:00 -0000
@@ -3,6 +3,7 @@ COMMENT =       Apache SpamAssassin integratio
 V =            0.8
 FILTER_NAME =  spamassassin
 DISTNAME =     filter-spamassassin-${V}
+REVISION =     0
 HOMEPAGE =     https://www.umaxx.net/
 
 CATEGORIES =   mail
Index: patches/patch-filter-spamassassin_go
===================================================================
RCS file: patches/patch-filter-spamassassin_go
diff -N patches/patch-filter-spamassassin_go
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-filter-spamassassin_go        4 Nov 2026 10:08:00 -0000
@@ -0,0 +1,18 @@
+handle the smtpd filter-protocol version 0.8 too
+
+the only difference is that messages can be prepended with
+"priority tags".  this filter is not logging to stderr though
+so it's effectively a no-op.
+
+Index: filter-spamassassin.go
+--- filter-spamassassin.go.orig
++++ filter-spamassassin.go
+@@ -211,7 +211,7 @@ func run() {
+       for in.Scan() {
+               f := strings.Split(in.Text(), "|")
+               t, ver, ev, sid := f[0], f[1], f[4], f[5]
+-              if (t != "filter" && t != "report") || ver != "0.7" {
++              if (t != "filter" && t != "report") || ver != "0.8" {
+                       l3.Err(fmt.Sprintln(sid, "protocol", t, ver))
+                       return
+               }

Reply via email to