This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITP] postfix 2.11.3


Hi Christian,

On Nov 13 23:48, Christian Franke wrote:
> I would like to contribute the Postfix Mail Transfer Agent.
> 
> http://www.postfix.org/
> 
> Download:
> wget -e robots=off -np -nH --cut-dirs=1 -R'index.html*' -r \
>   http://chrfranke.no-ip.org/cygwin/x86/release/postfix \
>   http://chrfranke.no-ip.org/cygwin/x86_64/release/postfix
> 
> Important: It requires cygwin 1.7.33-1 (or a recent 1.7.33-0.X test
> release). It does not work with 1.7.32-1.
> 
> For a first test try 'postfix-config --dryrun'. See the /etc/postfix/main.cf
> sample for some more info.

Packaging looks basically ok, but I see a few problems in
postfix-config:

- The script uses passwd -R without asking the admin.  I'm not so sure
  that's feasible.  The admin should have a say in the matter.  Also, is
  passwd -R really required?  This is typically no necessary, unless you
  potentially have to do stuff with native Windows tools (cron, sshd
  session).  Postfix doesn't seem to be a candidate for that.

- The script still accesses /etc/group and /etc/passwd, but it should
  not.  For reading there's getent available for quite some time now.
  Creating accounts in /etc/passwd and /etc/group should depend on the
  Cygwin version.  I prepared a matching function for testing this in
  csih, which looks like this:

# ======================================================================
# Routine: csih_use_file_etc passwd|group
#   Check if /etc/passwd or /etc/group file is in use.
#   On Cygwin versions < 1.7.33, files are always used.
#   On Cygwin versions >= 1.7.33 it depends on /etc/nsswitch.conf.
#
#     If /etc/nsswitch.conf doesn't exit, "db" is used and we don't
#     need the files.
#
#     If /etc/nsswitch.conf exists, and passwd/group lines contain
#     the "db" entry, "db" is used and we don't need the files.
#
#     Otherwise, we need the files.
#
#   Returns 0 if files shall be used, 1 otherwise.
# ======================================================================
csih_use_file_etc()
{
  local file
  local use_file

  if [ "$1" != "passwd" -a "$1" != "group" ]
  then
    csih_error 'Script error: csih_use_file_etc requires argument "passwd" or "group".'
  fi
  /usr/bin/uname -r |
  /usr/bin/awk -F. '{
                      if ($1 < 1 || \
                          ($1 == 1 && $2 < 7) || \
                          ($1 == 1 && $2 == 7 && strtonum($3) <= 33))
                        exit 0;
                      exit 1;
                    }'
  use_file=$?
  if [ ${use_file} -ne 0 -a -f /etc/nsswitch.conf ]
  then
    grep -Eq "^${file}:.*\<db\>" /etc/nsswitch.conf || use_file=0
  fi
  return ${use_file}
} # === End of csih_use_file_etc() === #
readonly -f csih_use_file_etc

  Maybe you could just copy the method for now until I get my lazy
  back to finish the work on csih?

- I don't understand this one in create_postfix_accounts:

    if /usr/bin/find / -maxdepth 0 -group "$setgid_group" >/dev/null 2>&1; then
      [...]

  What are you looking for in /?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpRcDlVh16g3.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]