Mail -s help ,change the sender to correct one

Hi expert

I use

mail -s "hello"  bruce@sohu.com <kernel-img.conf

send mail, it display the sender is lyang001@lyang001-OptiPlex-9010.corp.ad..com

How can I change the sender to yanglei.fage@gmail.com to default ?

Use -- to enable sendmail-options, then use -r option to specify sender:

mail -s "hello"  bruce@sohu.com -- -r "yanglei.fage@gmail.com" < kernel-img.conf