Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 360097

Summary: mail-mta/postfix-2.7.3 installer removes /usr/lib/sendmail with no warning
Product: Gentoo Linux Reporter: Grzegorz Mucha <grzegorz.mucha>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: grzegorz.mucha
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Grzegorz Mucha 2011-03-23 09:36:50 UTC
When upgrading postfix-2.7.2 (or earlier) to 2.7.3, the installer removes /usr/lib/sendmail, which is a symbolic link to /usr/sbin/sendmail.

The problem is that /usr/lib/sendmail is the old location derived from original sendmail, and is used by many application as the default path to sendmail binary. Running emerge to upgrade postfix to 2.7.3 removes this link, but it does not issue any warning, also no information exists in Release Notes. Applications, that rely on this path, cannot execute sendmail any more.

One of the examples is cyrus-imapd, which uses /usr/lib/sendmail by default for forwarding mails from sieve scripts - I described this situation here: http://forums.gentoo.org/viewtopic.php?p=6623217

Reproducible: Always

Steps to Reproduce:
1. Having installed postfix-2.7.2 or earlier, run 'ls -l /usr/lib/sendmail' to see the file exists
2. Upgrade postfix to 2.7.3 running emerge
3. Run 'ls -l /usr/lib/sendmail' again
Actual Results:  
In previous versions running ls resulted in:

# ls -l /usr/lib/sendmail
lrwxrwxrwx 1 root root 18 Mar 15 09:06 /usr/lib/sendmail -> /usr/sbin/sendmail

After upgrade to 2.7.3, the result is as follows:

$ ls -l /usr/lib/sendmail
ls: cannot access /usr/lib/sendmail: No such file or directory

This is the result of direct check of /usr/lib/sendmail binary. Lack of this files results in errors dropped from other applications, for instance cyrus reports:

Mar 15 01:47:40 myhost lmtpunix[14342]: FATAL: couldn't exec() sendmail 

Expected Results:  
ebuild should be corrected. 

Option 1: as many application use /usr/lib/sendmail by default, or this path can be set in many old configuration files, the best solution would be to leave this link, instead of removing it

Option 2: if the above is not possible due to some ideas, emerge should issue a clear warning message, that /usr/lib/sendmail is to be removed and administrator should check configuration of all his applications using sendmail binary and change or define sendmail path to /usr/sbin/sendmail
Comment 1 Grzegorz Mucha 2011-03-23 09:49:10 UTC
# emerge --info
Portage 2.1.9.42 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.27-gentoo-r10 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r10-i686-AMD_Sempron-tm-_Processor_2600+-with-gentoo-1.12.14
Timestamp of tree: Wed, 23 Mar 2011 06:00:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 1.3.7-r1, 2.1.11-r3
dev-lang/python:     2.6.6-r2, 3.1.3-r1
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13::<unknown repository>, 2.65-r1
sys-devel/automake:  1.4_p6::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.9.6-r2::<unknown repository>, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=athlon -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 berkdb bitmap-fonts cli crypt ctype curl exif ftp gd gdbm geoip gif gnome imap jpeg libwww lm_sensors memlimit mmx mysql ncurses nls nptl nptlonly offensive pam pcre pear perl php png python readline sasl sdl session sse ssl tcpd threads unicode x86 xml zlib" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" PHP_TARGETS="php5-3" USERLAND="GNU" VIDEO_CARDS="vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-23 16:38:06 UTC

*** This bug has been marked as a duplicate of bug 359289 ***