Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sure it is a dumb question, but I want to change the sender of mails sended by my Linux server (centos 5). All mails sent to user "dev" are forwarded via a /home/dev/.forward file, with this sender : is the hostname of this server, but it's an internal server and it does not even have a public IP. How to have a sender like I try to change the "official domain name" (line begining by "Dj" but it change nothing).


share|improve this question

The actual address used as the sender is determined by the application doing the sending, unless you decide to get the MTA involved for some reason. See the documentation of the specific application to discover where to change it.

share|improve this answer
I think the sending is done by the MTA, because mails are sent to user root and forwarded to another adress because of a /root/.forward file. – Cédric Girard Jun 21 '10 at 12:37

Normally for this i use generic maps from postfix (imho one of the best - if not the best- mailserver for *nix).

On centos If i remember correctly the default smtp daemon is sendmail.
In this case i'd suggest you to install postfix (much more easy to manage).

share|improve this answer

If you need only to send mail from services and do not need to receive incoming mail or have local mailboxes, I'd rather use ssmtp than postfix or some other heavyweight mail system.

The whole config of ssmtp fits in just couple of lines and it has an easy and straightforward way to rewrite the sender's address.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.