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 want to deploy the ssmtp config to multiple machines and not have to hardcode the hostname to /etc/ssmtp/ssmtp.conf

How can I do this?

share|improve this question
Can you explain your situation a bit better? In most enviroments, all systems should have the same relay name to drop mails to, because that's what SSMTP is designed to to. – Sven Jul 26 '12 at 11:31
It is about the hostname= parameter from the config file, which says how to present the machine name sending the email, it is not the SMTP server. I tried to comment it and the messages are still sent but SSMTP does not add the machine hostname to the messages. – sorin Jul 26 '12 at 11:34
Sorry, but where do you want ssmtp to add the machine hostname to the messages? If you don't specify the hostname parameter, ssmtp will use the configured hostname (i.e. the name you get when you enter the hostname command). – Oliver Jul 26 '12 at 11:43

Your Answer


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

Browse other questions tagged or ask your own question.