Nginx – configuring sendmail sender address

nginxsendmail

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 admin@mydomain.com. How do I do this?

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

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

Best Answer

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

sendmail -f me@mydomain.com