I have setup SSMTP on a few servers to all use the same email address to send mail from. Now, obviously, whenever I get a mail from one of these servers, the mails all originate from this same email address. I would like for the servers so send with a different "full name", e.g.:

  • mail from ServerA: "Server A" <myservers@myhost.com>
  • mail from ServerB: "Server B" <myservers@myhost.com>

Reading through the SSMTP manfile, I found the -F option, which should do exactly what I want. However, I can't find a way to set some default value for -F. My Google-fu is failing me. Is there any way to achieve what I want?

[Edit] Hm, so far, I hadn't bothered trying the -F command line flag. I just did and even that is not working for me. I have SSMTP setup to send with a GMail account. Could that be the cause?


I don't know about SSMTP but most mail agents take their default full name values from the name field in /etc/passwd. You might try changing it for the originating user using passwd -f or manually editing the file to enter names. This is typically the 5th field in the file.

  • Thanks! I guess you mean chfn -f? As far as I can see passwd doesn't accept an -f option. Doesn't seem to work for SSMTP though. – Darhuuk Apr 16 '11 at 12:13
  • Ya, sorry that is a distro difference and I keep forgetting not all passwds are created equal and my passwd command has super ninja powers. – Caleb Apr 16 '11 at 12:16
  • What name does SSMTP pick up as the default? Maybe you could search for that name somewhere and figure out where it's coming from that way. – Caleb Apr 16 '11 at 12:17
  • It's not picking up any name, mails are send from &lt;myservers@myhost.com&gt;, no full name. – Darhuuk Apr 16 '11 at 12:20

It looks like you may be able to setup aliases in the /etc/revaliases file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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