Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5096 - Postfix and mailx collision
Summary: Postfix and mailx collision
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal major (vote)
Assignee: Grant Goodyear (RETIRED)
Depends on:
Reported: 2002-07-16 10:54 UTC by Christian Axelsson
Modified: 2003-02-04 19:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Axelsson 2002-07-16 10:54:46 UTC
After first installed postfix (1.1.11-r1) and then mailx ( I have this:

qpkg -f /bin/mail
net-mail/mailx *
qpkg -f /usr/bin/mail
net-mail/postfix *

An obvious collision.
Is it safe to remove /usr/bin/mail? (it's a symlink to /usr/sbin/sendmail)
Comment 1 Grant Goodyear (RETIRED) gentoo-dev 2002-07-16 12:08:00 UTC
Actually, it's _not_ a collision, since /usr/bin/mail and /bin/mail
are certainly different paths.  /usr/bin/mail should point to 
/usr/sbin/sendmail; the lore is that removing that symlink might break things.
Comment 2 Grant Goodyear (RETIRED) gentoo-dev 2002-07-16 13:31:16 UTC
From an e-mail by Christian Axelsson:

Well, both /bin/mail and /usr/bin/mail are in the users path, that's a collision.
If I run 'mail', the program that gets executed will be the last one found in my
Please dont tell me that this is the way it is supposed to be?
On all other distributions I've seen, sendmail never have a 'mail' symlink
pointing at it (but sendmail itself can be a symlink).
From applications, sendmail should be referd to as /usr/bin/sendmail or

Hmmm.  I had thought that postfix installed the /usr/bin/mail -->
/usr/sbin/sendmail symlink, but it seems that we do.  I've no idea why.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-07-17 13:24:22 UTC
nosferatu init.d # echo $PATH
nosferatu init.d # which mail
nosferatu init.d # 

The one first in $PATH should be executed.  I think the /usr/bin/mail symlink
have its roots from the time when there was not /bin/mail.  If I remember
correctly, mailx was my first ebuild when I started to use Gentoo ;-)

Anyhow, if no other disto have this, I think it should be safe to remove.  I
just do  not have access to boxes with other distro on them, so a bit
difficult for me to verify.
Comment 4 Grant Goodyear (RETIRED) gentoo-dev 2002-07-19 10:07:18 UTC
Fixed on CVS by yanking the symlink.