1

Ubuntu 18.04, ssmtp installed, mailutils installed and everything works, can send through gmail. My problem is that the messages when received appear to be from "Root (my-real-email@gmail.com)" I am trying to change "root" to a name that wont set off my spam filters at work, which "root" seems to do.

How do I set the username so it appears in the outgoing message as something other than "Root"?

andrew.46
  • 37,085
  • 25
  • 149
  • 228
alabamatoy
  • 427
  • 8
  • 16
  • It would be easier, and you would be using a better application, if you used msmtp. Then you would simply set a 'From:' field in a local `~/.msmtprc` file... – andrew.46 Aug 03 '19 at 00:49
  • Sorry, I have multiple deployments of ssmtp, not changing unless forced to do so. Ssmtp allows setting from *address* but I can't figure how to set username – alabamatoy Aug 03 '19 at 13:41
  • Fair enough. If you have a look at the base of the ssmtp man pages you will see a section called 'Reverse Aliases'. I quote that section: 'A reverse alias gives the From: address placed on a user's outgoing messages and (optionally) the mailhub these messages will be sent through'. Which I believe is what you are after? Should be placed in `/etc/ssmtp/revaliases`. Untested by me but if this does not work I will install ssmtp and test it all out... – andrew.46 Aug 03 '19 at 23:46
  • Setting the "from" value changes the address, not the username. A message sent from ssmtp will appear as being sent by username(email@somewhere.com) where the from address is email@somewhere.com. Username is what I am trying to change, it apparently defaults to the account under which the mail command was run. This is what I am trying to change. All my scripts appear on sent messages as coming from "Root(someone@somewhere.com)"....and I am trying to change the "Root" part. – alabamatoy Aug 04 '19 at 12:36

0 Answers0