My root user send emails with ssmtp. However I can't change "From: root ..." root name. Is there any way to send email with another name without using another user?

Tried:

echo 'From: "New name" ' | ssmtp to@gmail.com -v

link|improve this question
feedback

3 Answers

You can set up a reverse alias in /etc/ssmtp/revaliases

root:someone@yourdomain.tld

it's hidden at the bottom of the man page.

link|improve this answer
feedback

I suggest you switch from ssmtp to msmtp since ssmtp is not actively developed any more. msmtp provides all the same features as ssmtp plus more. In particular, with msmtp you can set the from setting to control who the mail appears to be sent from.

link|improve this answer
feedback

Add the following in Your /etc/ssmtp/ssmtp.conf file and You will capable to set any name and email during runtime :

FromLineOverride=YES
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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