pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fwd: OpenSMTPD in NetBSD



Hello,

I had been working on OpenSMTPd 6.7.1 too awhile ago. I got smtpd it working by setting
CONFIGURE_ARGS+= ac_cv_func_strtonum=no
i.e. strtonum() works differently on NetBSD and OpenBSD.

Does that help?
BR,
Dennis

On 2020-09-16 01:41, Steve Sartorius wrote:
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> wrote:


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:

+++ smtpd/smtpctl.c
@@ -966,7 +966,7 @@ do_encrypt(int argc, struct parameter *a

       if (argv)
               p = argv[0].u.u_str;
-       execl(PATH_ENCRYPT, "encrypt", "--", p, (char *)NULL);
+       execl(PATH_ENCRYPT, "encrypt", p, (char *)NULL);
       errx(1, "execl");
}

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 ssartor@odyssey.localnet --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-8BITMIME
<-  250-ENHANCEDSTATUSCODES
<-  250-SIZE 36700160
<-  250-DSN
<-  250 HELP
-> MAIL FROM:<root@odyssey.localnet>
<-  250 2.0.0 Ok
-> RCPT TO:<ssartor@odyssey.localnet>
<-  250 2.1.5 Destination address valid: Recipient ok
-> DATA
<-  354 Enter mail, end with "." on a line by itself
-> Date: Sun, 13 Sep 2020 11:28:22 -0400
-> To: ssartor@odyssey.localnet
-> From: root@odyssey.localnet
-> Subject: test Sun, 13 Sep 2020 11:28:22 -0400
-> Message-Id: <20200913112822.026401@odyssey.localnet>
-> X-Mailer: swaks v20190914.0 jetmore.org/john/code/swaks/ [1]
->
-> This is a test mailing
->
->
-> .
*** Remote host closed connection unexpectedly.

This silently kills smtpd — no error message, no core file.

thanks,

Steve

Links:
------
[1] http://jetmore.org/john/code/swaks/


Home | Main Index | Thread Index | Old Index