How to change GECOS name in mail sender address?

Solution Verified - Updated -


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

I get the header:

From: Oracle Owner <oracle@hostname>

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


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

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In