This discussion is archived
1 Reply Latest reply: Dec 31, 2012 7:42 AM by Erman Arslan RSS

OEL6.2 strange mailx behavior

977173 Newbie
Currently Being Moderated
I have found strange issue while using mail command (mailx).

Try to login as root and send mail with ex.:

# echo test | mail -v -s "test" someuser@somedomain.com

it will be send with
MAIL From:<root@...> SIZE=214 AUTH=root@...
# echo test | mail -d -s "test" someuser@somedomain.com
user = root, homedir = /root
Sendmail arguments: "send-mail" "-i" "someuser@somedomain.com"

Then try login as regular_user and do
# su -
# echo test | mail -v -s "test" someuser@somedomain.com

it will be send with
MAIL From:<regular_user@...> SIZE=214 AUTH=regular_user@...
# echo test | mail -d -s "test" someuser@somedomain.com
user = root, homedir = /root
Sendmail arguments: "send-mail" "-i" "someuser@somedomain.com"


can anyone explain it? :) as I would expect that in both cases "MAIL From:" should be set to 'root@...' and is not. I have checked this on RHEL4/Gentoo and there is as I'd expect - in both cases mail is sent from root.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points