Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2022 14:27:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 264350] mail/opendkim
Message-ID:  <bug-264350-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264350

            Bug ID: 264350
           Summary: mail/opendkim
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: admin@sigma-soft.ru
                CC: freebsd-ports@dan.me.uk
             Flags: maintainer-feedback?(freebsd-ports@dan.me.uk)
                CC: freebsd-ports@dan.me.uk

opndkim-2.10.3_16 does not start without PidFile parameter in opendkim.conf=
 and
with UserId parameter with group included:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
##  Change to user "userid" before starting normal operation?  May include
##  a group ID as well, separated from the userid by a colon.

# UserID                userid
UserID                  mailnull:mailnull
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

Without colon

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
UserID                  mailnull
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

works fine.

This is a result of erroneous return of function get_pidfile_from_conf from
/etc/rc.subr

Test script:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
#!/bin/sh

#
# get_pidfile_from_conf string file
#
#       Takes a string to search for in the specified file.
#       Ignores lines with traditional comment characters.
#
# Example:
#
# if get_pidfile_from_conf string file; then
#       pidfile=3D"$_pidfile_from_conf"
# else
#       pidfile=3D'appropriate default'
# fi
#
get_pidfile_from_conf()
{
        if [ -z "$1" -o -z "$2" ]; then
                err 3 "USAGE: get_pidfile_from_conf string file ($name)"
        fi

        local string file line

        string=3D"$1" ; file=3D"$2"

        if [ ! -s "$file" ]; then
                err 3 "get_pidfile_from_conf: $file does not exist ($name)"
        fi

        while read line; do
                case "$line" in
                *[#\;]*${string}*)      continue ;;
                *${string}*)            break ;;
                esac
        done < $file

        if [ -n "$line" ]; then
                line=3D${line#*/}
                _pidfile_from_conf=3D"/${line%%[\"\;]*}"
        else
                return 1
        fi
}

    if get_pidfile_from_conf PidFile /usr/local/etc/mail/opendkim.conf; then
        pidfile=3D"$_pidfile_from_conf"
        echo $pidfile
    else
        pidfile=3D"/var/run/milteropendkim/${profile:-pid}"
    fi
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Result with colon (UserID                       mailnull:mailnull):
/UserID mailnull:mailnull

Result without colon (UserID                    mailnull) - empty.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264350-7788>