13
運行sendmail命令我通常會收到發件人的電子郵件,如[email protected]
。使用bash更改sendmail發件人
有沒有辦法使用sendmail發送電子郵件並將發件人設置爲與用於運行命令的用戶帳戶不同的內容?
運行sendmail命令我通常會收到發件人的電子郵件,如[email protected]
。使用bash更改sendmail發件人
有沒有辦法使用sendmail發送電子郵件並將發件人設置爲與用於運行命令的用戶帳戶不同的內容?
什麼你要找的是-f
:
sendmail -F "Your name" -f "[email protected]" < your-message.txt
-Ffullname Set the full name of the sender.
-fname Sets the name of the ``from'' person (i.e., the sender of the
mail). -f can only be used by ``trusted'' users (normally
root, daemon, and network) or if the person you are trying to
become is the same as the person you are.