Configuration of Server root email - Change Address and Name on outgoing email

Solution 1:

This is not a job for the MTA; it should be done by the mail client.

Postfix is merely reporting the From: header as passed along by the client; in this case, porbably cron thorugh sendmail(1), which sets the friendlyname to the original sender (system user "root")

Why not have each servers' processes send mail to a designated local system account, and then process that and forward it to wherever you want ?

This allows you to modify each machine's outgoing email while avoiding the (unnecessary) mangling of a central MTA.

Solution 2:

  1. Change e-mail address:

    • vi /etc/postfix/generic

      root     [email protected]
      
    • vi /etc/postfix/main.cf

      smtp_generic_maps = hash:/etc/postfix/generic
      
    • postmap /etc/postfix/generic

    • postfix reload
  2. Change name - change name in passwd file from root to My Name:

    • vi /etc/passwd:

      root:x:0:0:Own Name:/root:/bin/bash