Bug 276704 - mail/opendkim fail to start with lua54 if lua files is really specified
Summary: mail/opendkim fail to start with lua54 if lua files is really specified
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Norikatsu Shigemura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-29 05:17 UTC by Yasuhito FUTATSUKI
Modified: 2024-03-11 15:18 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd-ports)


Attachments
a patch to fix the bug causes crash on lua 5.4 (4.38 KB, patch)
2024-02-27 07:18 UTC, Yasuhito FUTATSUKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhito FUTATSUKI 2024-01-29 05:17:41 UTC
milter-opendkim with liblua-5.4 cannot start if lua file is really specified in opendkim.conf.
It crash by signal 6(SIGABRT).

My opendkim.conf (masking real domain):
[[[
AuthservID              mail.example.com
Canonicalization        relaxed/relaxed
KeyTable        /usr/local/etc/mail/opendkim/KeyTable
Mode                    sv
OverSignHeaders From
PidFile /var/run/opendkim/opendkim.pid
ReportAddress           "DKIM Error Postmaster" <postmaster@example.com>
Selector                default
SignHeaders     From,Reply-To,Subject,Date,To,Cc,Resent-Date,Resent-From,Resent-Sender,Resent-To,Resent-cc,In-Reply-To,References,List-Id,List-Unsubscribe,List-Post,List-Owner,List-Archive,Sender
SetupPolicyScript       /usr/local/etc/mail/opendkim/setup.lua
Socket                  local:/var/run/opendkim/opendkim.sock
Syslog                  Yes
UMask                   002
Userid  mailnull:mailnull
]]]

If /usr/local/etc/mail/opendkim/setup.lua is not exists or cannot read by mailnull, the milter stops without signal 6. Also opendkim build with lua52 can start normally with above setting (and readable setup.lua file).
Comment 1 Yasuhito FUTATSUKI 2024-02-27 07:18:47 UTC
Created attachment 248781 [details]
a patch to fix the bug causes crash on lua 5.4

This was caused by the bug introduced by the code for supporting Lua >= 5.2.
See https://github.com/trusteddomainproject/OpenDKIM/pull/201 .
Comment 2 Norikatsu Shigemura freebsd_committer freebsd_triage 2024-03-07 14:19:33 UTC
I'll handle this.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-03-11 15:16:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fb4ba36cba6f14d96323cee7f2e16b56a9ed205c

commit fb4ba36cba6f14d96323cee7f2e16b56a9ed205c
Author:     Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org>
AuthorDate: 2024-03-11 15:15:30 +0000
Commit:     Norikatsu Shigemura <nork@FreeBSD.org>
CommitDate: 2024-03-11 15:15:30 +0000

    mail/opendkim: Fix fail to start with lua54 if lua files is really specified

    PR:             276704
    Approved by:    hrs (mentor), maintainer timeout

 mail/opendkim/Makefile                            |  2 +-
 mail/opendkim/files/patch-miltertest_miltertest.c |  5 +++--
 mail/opendkim/files/patch-opendkim_opendkim-lua.c | 20 ++++++++++++--------
 3 files changed, 16 insertions(+), 11 deletions(-)
Comment 4 Norikatsu Shigemura freebsd_committer freebsd_triage 2024-03-11 15:18:53 UTC
Committed, done.  Thanks!