> On Sep 9, 2020, at 07:40, Juraj Lutter <otis%NetBSD.org@localhost> wrote:
>> On 9 Sep 2020, at 13:32, Juraj Lutter <otis%NetBSD.org@localhost> wrote:
>>> On 9 Sep 2020, at 13:24, Chavdar Ivanov <ci4ic4%gmail.com@localhost
>>> I built it yesterday under NetBSD-current (9.99.72 from yesterday). It
>>> doesn't start for me; the last thing ktruss shows is the fork. I just
>>> used the supplied conf file for local transport.
>> To make it clear: I have tested the build on NetBSD 9.0 and I have tested
>> also actually RUNNING it on SmartOS (it will need a SMF manifest to be complete).
>> On NetBSD I’ve run into similar problem that also you’ve run into,
>> on SmartOS it worked and I was able to use it for mail forwarding.
>> I’ll look for the problems on NetBSD.
> It tries to chroot into /var/empty that is not being created while installing
> the package.
I sent this on Sunday but didn't see it show up on the list so trying again...
I had a chance to play with OpenSMTPD this week. A couple of points:
1. The smtpctl binary must be run setgid _smtpq
2. In order to get ‘smtpctl encrypt’ functionality, the source must be patched:
@@ -966,7 +966,7 @@ do_encrypt(int argc, struct parameter *a
p = argv.u.u_str;
- execl(PATH_ENCRYPT, "encrypt", "--", p, (char *)NULL);
+ execl(PATH_ENCRYPT, "encrypt", p, (char *)NULL);
This was patched in master back in February but didn’t make it into the portable code.
3. And lastly…I can’t get smtpd to run! I mean it starts up and runs but I can’t get it to send mail. It silently dies when I try to send anything. Using ‘swaks’ to generate a test email from the command line I get:
/usr/pkg/etc # swaks --to email@example.com --server localhost
=== Trying localhost:25...
=== Connected to localhost.
<- 220 odyssey.localnet ESMTP OpenSMTPD
-> EHLO odyssey.localnet
<- 250-odyssey.localnet Hello odyssey.localnet [::1], pleased to meet you
<- 250-SIZE 36700160
<- 250 HELP
-> MAIL FROM:<firstname.lastname@example.org>
<- 250 2.0.0 Ok
-> RCPT TO:<email@example.com>
<- 250 2.1.5 Destination address valid: Recipient ok
<- 354 Enter mail, end with "." on a line by itself
-> Date: Sun, 13 Sep 2020 11:28:22 -0400
-> To: firstname.lastname@example.org
-> From: email@example.com
-> Subject: test Sun, 13 Sep 2020 11:28:22 -0400
-> Message-Id: <firstname.lastname@example.org>
-> X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/
-> This is a test mailing
*** Remote host closed connection unexpectedly.
This silently kills smtpd — no error message, no core file.