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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.