Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 : dev@host.epiconcept.fr.

host.mydomain.fr 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 admin@mydomain.fr? I try to change the "official domain name" (line begining by "Dj" but it change nothing).

Regards
Cédric

share|improve this question

3 Answers 3

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).

http://www.postfix.org/ADDRESS_REWRITING_README.html#generic

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

 
discard

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.