pkgsrc-Users archive

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

Re: Weird config path in rc.d/opensmtpd



On 25/02/25 04:23AM, James Cook wrote:
> Hi,
> 
> /usr/pkg/share/examples/rc.d/opensmptd (after copying it to /etc/rc.d)
> expects my smtpd.conf to be at
> 	/usr/pkg/etc/smtpd/smtpd/smtpd.conf
> which seems like one too many "smtpd"s. 
> 

My mistake. This is a remnant of a SYSCONFDIR handling change happened
between OpenSMTPD 7.5 and 7.6. I already had a rc.d script in place on
my system so I missed this. Just fix the script as follows:

@@ -14,7 +14,7 @@ $_rc_subr_loaded . @SYSCONFBASE@/rc.subr
 name="smtpd"
 rcvar=opensmtpd
 
-: ${smtpd_config:="@PKG_SYSCONFDIR@/smtpd/${name}.conf"}
+: ${smtpd_config:="@PKG_SYSCONFDIR@/${name}.conf"}
 : ${smtpd_server:="@PREFIX@/sbin/${name}"}
 : ${smtpd_flags:=""}
 

Or get the latest opensmtpd on pkgsrc, which also uses a more
conventional chroot dir, instead of mimicking OpenBSD use of
/var/empty.

Pinging @bsiegert, to ask whether it is the case to backport this
changes to 2024Q4. 

Regards

--
PVO

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index