Le Fri, May 01, 2026 at 06:55:38PM +0200, Lydia Sobot a écrit : > I've been awaiting this update, but I just noticed a few things based on > install.sh: it appears that STALWART_PATH no longer exists, and you > simply need to give Stalwart a config file path (which should now be in > /etc/stalwart/ and not in /var/stalwart/etc/, and should ideally in > fact not exist to trigger its initial setup), nor do the user/group > overrides, so there is presumably no privdrop anymore unfortunately. > For now I copied over the example environment variables manually into > the login.conf drop-in from install.sh as comments, this is surely a bit > janky so better places to put that are welcome; in any case of course I > removed the @sample directive in the PLIST, just keeping the login.conf > drop-in installed as an example. I am not entirely sure I know what I'm > doing with the PLIST given that update-plist adds this back, so please > advise on how to do this better, or if this is just a default. as i said, i havent tested it and it requires a bit of time.. i'll be more than happy for someone actually using it to take maintainership of the port :) the user/group override (replacing run-as patch chunk) should work via the env vars that are already present in the login.conf fragment - if not, that's something to fix, but i had a quick look at the code and the env vars were still read... > I tried to update the README to reflect most of the changes, however it > can definitely be finessed more. > > Also, why the patches against binding on IPv6 and IPv4? I'm not sure I > see why it would be problematic enough to deviate from upstream here, > but I'm probably out of my depth. Add them back if necessary. iirc, that's because on linux if you bind to [::] you get to listen on both v6 and v4 because of automagic AI_V4MAPPED or something, but that doesnt exist/work on openbsd. but i might be wrong. > Also also: is the binary symlink still necessary? I suppose an ancillary > questiom is: should the package still be called stalwart-mail and not > just stalwart? If we do some migration concurrent version shenanigans, > maybe it could be useful to use the name change somehow. your call - that's because it was previously split into several ports (imap,jmap,smtp..) and remerged, and now the cli is split again.. not against a rename :) > I also added 2 new patches to account for the fact that as I had > suspected, now that all configuration is moved to the database, there > have to be compile-time defaults for certain paths, and we need to > adjust that to /var/stalwart/ instead of /var/lib/stalwart/ as it would > be on Linux. Also, considering that it appears that Stalwart now assumes > it can just bind to unprivileged ports with the appropriate capability > set, I *tried* to work around that by patching the default binding ports > to be unprivileged for all the listeners. Also, I patched out a > reference to an env file in the initial setup output, instead > referencing the more appropriate login.conf drop-in. > relayd example in the README forthcoming. the privdrop should still work via the env vars, so you shouldnt need to patch to bind to unpriviledged ports.. good catch for the var/lib/stalwart -> var/stalwart fix, i knew i was going to miss some. > I'm wondering if we should provide the v016 migration script, and/or > make an upgrade confirmation of sorts à la Postgres, as the migration > process requires dealing with the old version, then the new version, in > a very specific sequence of operations. For now, I copied the UPGRADING > guide. Maybe once this is merged, we should put a message on the release > branch indicating to brace for a complex migration or something. i've never did any of those funky upgrades, that seems completely crazy. but i guess the cli is supposed to handle that via 'export before upgrade - pkg_add -u - repimport after upgrade' - copying the UPGRADING page is an option, why not. > Is it too late to change _stalwart-smtp's homedir to /var/stalwart/? > That makes a bit more sense to me than just /var/empty/, but that's me. what would that fix ? iirc, if you have already the port installed, changing the homedir in the port wont change it for existing installs, so you need a faq/current.html entry to tell users to manually change it. doable, but might aswell do all the 'large changes' in one go. > New diff attached, for 0.16.3 which just came out anyway, as well as an > extract of the old Stalwart README applicable to stalwart-cli, which > surely needs more work as well. oh, right. sigh :) thanks a lot for picking up the ball, from that point i'll await more revisions of this diff from you, and i'll try to do some actual testing/bootstrap...
No comments:
Post a Comment