On 2019/01/04 16:32, Giovanni Bechis wrote:
> On 7/27/18 12:09 PM, Stuart Henderson wrote:
> > On 2018/07/27 10:15, Giovanni Bechis wrote:
> >> Hi,
> >> attached a port of postsrsd, an srs forwarding daemon for postfix.
> >> A couple of doubts:
> >> - It uses a secret file created at build time with "dd if=/dev/urandom
> >> bs=18 count=1 | /usr/bin/openssl base64 -e",
> >> should we add a README on how to create it ?
> >
> > If it needs something that isn't clear from the upstream documentation,
> > then adding it to a pkg-readme makes sense. (Not quite sure why they use
> > dd | openssl rather than just openssl rand -base64 18 though!)
> >
> >> - the Linux startup script uses something like that:
> >> -------------------------------------------------------------------
> >> SRS_DOMAIN=`postconf -h mydomain || true`
> >> daemon $DAEMON -d "$SRS_DOMAIN" ....
> >> -------------------------------------------------------------------
> >>
> >> Does it make sense to write a similar rc script or is it better to let the
> >> user configure it by hand and add it to rc.local ?
> >
> > That seems like too much magic to me, setting postsrsd_flags in
> > rc.conf.local
> > by hand seems a better idea. That's something that would definitely fit for
> > a pkg-readme.
> >
> > The rc script is missing from your tar.
> >
>
> new diff after a lot of time.
> comments ? ok ?
> Cheers
> Giovanni
> Index: user.list
> ===================================================================
> RCS file: /var/cvs/ports/infrastructure/db/user.list,v
> retrieving revision 1.336
> diff -u -p -r1.336 user.list
> --- user.list 29 Dec 2018 14:29:54 -0000 1.336
> +++ user.list 4 Jan 2019 14:15:12 -0000
> @@ -339,3 +339,4 @@ id user group port options
> 828 _ossecm security/ossec-hids
> 829 _ossecr security/ossec-hids
> 830 _pdns_recursor _pdns_recursor net/powerdns_recursor
> +831 _postsrsd _postsrsd mail/postsrsd
Sorry for the slow reply. A couple of quick comments, otherwise OK:
- trailing whitespace in COMMENT
- typo in README, s/postrsd/postsrsd/ in "Enable postrsd"
- I wondered about lib/postsrsd, I see it is just used as a chroot
directory. It maybe better to put it under /var as the filesystem
flags are usually a bit safer in /var and this would make it more
obvious what the empty dir is used for.
So I would add this to CONFIGURE_ARGS:
-DCHROOT_DIR=${LOCALSTATEDIR}/postsrsd
and change lib/postsrsd/ in PLIST to @sample ${LOCALSTATEDIR}/postsrsd/