Changing Your Email Sender Name

Content:

When sending emails, one of the first pieces of information the recipient will see is the name of the sender. It’s therefore desirable to ensure the email sender name is recognisable.

If you’re using an email client, they will often allow you to set a sender name. However, if your’re not using an email client, MTA’s will generally use the system username as the sender name. This isn’t necessarily a good choice.

This is particularly true when sending emails through system user accounts. A web server, for example, may use the www-data user account to send out emails. To the recipient, the name www-data is rather odd, and could lead to the email being ignored. It’s not obvious who this email is from.

Changing this name is rather simple, and involves adding a full name to your system user account.

This is done using the rather cryptically-named chfn. This command changes your ‘Finger’ information – ‘Finger’ being a protocol used to store and exchange user information.

To change the full name of a user using chfn, use the following command:

chfn -f "name to display" username

For example, to change the display name of the account www-data to “Store Newsletter”, use the command:

chfn -f "Store Newsletter" www-data

You can apply this change to any user account on the system, and emails sent from this account will use the name provided.

This is a simple, but effective way to ensure your outgoing emails are sent using an appropriate sender name.