------------ Original Message ------------ > Date: Tuesday, May 19, 2015 10:13:20 AM -0400 > From: Tim Evans <tkevans@xxxxxxxxxxx> > > On 05/19/2015 10:07 AM, mcclnx mcc wrote: >> We have CEntOS 6.3 on DELL server. WE try to use following mail >> command but failed. This command perfect work on CentOS 5.X. $ >> mail -s "test..." user1@xxxxxxx -- -f NoReply@xxxxxxxxxx test >> . >> EOT >> $ /home/app/oracle/dead.letter... Saved message in >> /home/app/oracle/dead.letter >> >> problem come from "-- -f NoReply@xxxxxxxxxx". But it work >> correctly on CentOS 5.x. Anyone know how to fix it? > > CentOS 6 man page says '-f' means "mail the contents of the file." > YOu probably want '-r' With 5.x "mail" was /usr/bin/mail, and "--" lets you pass sendmail options (where the -f is the "From"). With 6.x and 7, "mail" is symlinked to mailx, which doesn't seem to have the "--" flag and the ability to pass the sendmail options. In both mail and mailx, a bare "-f" is a read from file. _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos