GNU bug report logs -
#75571
[PATCH] gnu: opensmtpd: Fix fix for queuing of offline messages.
Previous Next
Reported by: Tomas Volf <~@wolfsden.cz>
Date: Wed, 15 Jan 2025 01:39:02 UTC
Severity: normal
Tags: patch
Done: Andreas Enge <andreas <at> enge.fr>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 75571 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Felix Lechner <felix.lechner <at> lease-up.com> writes:
> Hi Tomas,
>
> Okay, maybe your patch is the right way but, aside from adding makemap,
> is it all that superior?
Well the reason I even wrote this patch is that (at least for me) the
original fix no longer works.
Notice the path in the following snippet (the commit is current HEAD at
the time of writing this):
--8<---------------cut here---------------start------------->8---
$ strings $(guix time-machine -q --commit=b696658ee8e0655b17f5d26e024956b5148e36d6 -- build opensmtpd)/sbin/smtpd | grep smtpctl
/gnu/store/7p98k2p2d3zza41sv1npy3y90c280grc-opensmtpd-7.6.0p1/sbin/smtpctl
warn: smtpd: couldn't enqueue offline message %s; smtpctl %s
--8<---------------cut here---------------end--------------->8---
As you can see, it points into the store.
During debugging I noticed two issues:
1. The path in smtpd.h[0] is /usr/sbin/smtpctl, but the code looks for
/usr/bin/smtpctl (sbin vs bin).
2. The #define is guarded by #ifndef[1], so even if the path is
replaced, it is never used (due to [2]).
After my fix, the binary now contains the correct path:
--8<---------------cut here---------------start------------->8---
$ strings $(guix build opensmtpd)/sbin/smtpd | grep smtpctl
/run/privileged/bin/smtpctl
warn: smtpd: couldn't enqueue offline message %s; smtpctl %s
--8<---------------cut here---------------end--------------->8---
Does the current version work for you? I do not think I am doing
anything weird in my configuration, but I was not able to pinpoint any
upstream change that would have effect on this, so I am unsure why the
original version stopped working.
Have a nice day,
Tomas
0: https://github.com/OpenSMTPD/OpenSMTPD/blob/master/usr.sbin/smtpd/smtpd.h#L81
1: https://github.com/OpenSMTPD/OpenSMTPD/blob/master/usr.sbin/smtpd/smtpd.h#L80
2: https://github.com/OpenSMTPD/OpenSMTPD/blob/master/mk/pathnames#L7
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.