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

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

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.