How to change GECOS name in mail sender address?

Solution Verified - Updated -

Issue

The content of the GEC0S filed gets written into the sender address.

An example:

user@hostname:~$ grep oracle /etc/passwd
oracle:x:1222:200:Oracle Owner:/home/oracle:/bin/bash

oracle@hostname:~$ echo Hello | mail -s test recipient@domain.com

I get the header:

From: Oracle Owner <oracle@hostname>

How to rewrite the realname (in this example "Oracle Owner") from the GEC0S field ?

Environment

  • Red Hat Enterprise Linux (RHEL) 4, 5, or 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content