Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Just finished installing sendmail and was able to successfully send an email from the command line. However, the sender address was from root@EquinoX. I want to be able to change this so that the sender is from How do I do this?

I have changed my /etc/mail/local-host-names so that the only entry it has now is I have setup a A record, so that points to the server

UPDATE: When I restart sendmail I got hostname: Name or service not known, why is this?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I think typically people use the "-f" parameter for example:

sendmail -f
share|improve this answer
this means that you can set to send from any domain you wish, even if you don't own that domain? – EquinoX Apr 14 '11 at 14:35
Yup. Though an intelligent receiver can look at the headers and figure out that it didn't really come from the domain you indicated, but most people won't bother. – dough Apr 14 '11 at 18:01

You should be able to do this using the -f switch e.g.

sendmail -f

This will let you set the from address.

share|improve this answer
is there a way to set this up automatically – EquinoX Apr 14 '11 at 14:19

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.