1

I have ssmtp installed in order to use the company server to send emails from the machine.

The problem is that the server is outlook and the emails have the "reply to" set to the user name: "root". This greatly upsets the outlook server, because it considers it to be junk.

How can I change the email address for the users? I don't want to use the forward solution proposed on other threads (~/.forward).

I would like to set ssmtp to send the reply address to user@hostname or something with "@domain"

Thank you

cristi
  • 583

2 Answers2

1

Quick googling pointed me to man page of ssmtp and it seems that You can use -f option in ssmtp.

-fname

Sets the name of the ''from'' person. This option is valid only if no From: line is specified within the header of the email.

Nehal Dattani
  • 581
  • 2
  • 10
0

You can use revaliases

The revaliases file defines what will appear in the "from" field of the email.

It's a good idea to set up an alias to force the "From:" line to a sensible value so edit the revaliases file:

sSMTP aliases

Format: local_account:outgoing_address:mailhub

Example: root:your_login@your.domain:mailhub.your.domain[:port] where [:port] is an optional port number that defaults to 25. You can add lines for each username that you intend to use. Note that since cron runs as root all reports from cron are addressed from user "root". Set the root's email address to a valid address as if a message bounces this is where it will end up.

You need to specify the mailhub again here.

cduffin
  • 894