Package: esmtp
Version: 0.5.1-4.1
Severity: serious
Justification: Policy 10.7.3

On first install of esmtp -- even when not installing esmtp-run, which
lets esmtp be the system MTA -- the postinst overwrites /etc/mailname,
even when answering the (default) "no" to "Automatically overwrite
configuration files?".

This is highly unfortunate when mailname was already set and in use by
other programs (e.g., the real MTA in case of nullmailer), and violates
the spirit, if not the wording, of Policy 10.7.3, "local changes [of
configuration files] must be preserved during a package upgrade".
Policy continues:

| The other way to do it is via the maintainer scripts. These scripts
| [...] must not overwrite or otherwise mangle the user's configuration
| without asking[.]

Extract from the postinst:

  db_get esmtp/overwriteconfig
  OverwriteConfig="$RET"
  
  if test -s /etc/esmtprc -a "$OverwriteConfig" = "false"
  then
          exit 0
  fi
  
  db_get esmtp/hostname
  HostName="$RET"
  
  if test ! -s /etc/mailname -o "`cat /etc/mailname`" != "$HostName"
  then
          echo "$HostName" > /etc/mailname
  fi

So if automatic overwriting is disabled *and* no non-empty esmtprc existed,
the postinst will exit without further configuration file tampering.
This would be okay for creating an esmtprc alone, but also overwrites
/etc/mailname (if it doesn't match the answer to "SMTP server hostname").

IMO, even if updating /etc/mailname would have been in order, *at least*
a single backup of each automatically overwritten configuration file
should be preserved.

Furthermore, putting the "SMTP server hostname" into /etc/mailname seems
to be a bad idea at all, cf. a value of "smtp.example.org" in a setup
that would likely need a mailname of "example.org".

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages esmtp depends on:
ii  debconf [debconf-2.0]       1.5.11       Debian configuration management sy
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libesmtp5                   1.0.3-1+b1   LibESMTP SMTP client library

Versions of packages esmtp recommends:
pn  esmtp-run                     <none>     (no description available)

-- debconf information:
* esmtp/username:
  esmtp/mda: procmail
  esmtp/hostport: 25
* esmtp/overwriteconfig: false
* esmtp/hostname: smtp.int.zzznowman.dyndns.org
  esmtp/starttls: disabled


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to