1 Reply Latest reply: Dec 31, 2012 9:42 AM by Erman Arslan RSS

    OEL6.2 strange mailx behavior

    977173
      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.