Any idea how can I change the 'From' field?
Используйте флаг -f
.
-fname
Sets the name of the ''from'' person
Вот так:
echo "foo" | sendmail -f maulinglawns -t root@localhost
Результат:
From maulinglawns@debian10 Wed Jan 22 21:11:24 2020 Return-Path: Received: from debian10 (localhost [127.0.0.1]) by debian10 (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 00MKBOq3005526 for ; Wed, 22 Jan 2020 21:11:24 +0100 Received: (from root@localhost) by debian10 (8.15.2/8.15.2/Submit) id 00MKBO0K005511 for root@localhost; Wed, 22 Jan 2020 21:11:24 +0100 Date: Wed, 22 Jan 2020 21:11:24 +0100 From: maulinglawns@debian10 Message-Id: foo