I think the best way is to create a technical user for ssmtp. There is a nice tutorial for that on https://wiki.freebsd.org/SecureSSMTP
Here is an excerpt from it, step 4,5,6,8,9 is what you're looking for (the paths may differ according to your linux distribution, I've customized it for Debian now):
[Step 4] Create an ssmtp user:
sudo useradd -g nogroup -M -s /bin/false -c "sSMTP pseudo-user" ssmtp
This will stick the ssmtp user in the nogroup group, disallowing password-based logins (-h).
[Step 5] Set the correct owner and permissions on the sSMTP configuration directory. We set the setuid bit (see chmod(1) to make sure new files in the directory will be owned by the user ssmtp as well:
chown ssmtp:wheel .
chmod 4750 .
[Step 6] Create the sSMTP configuration file with the correct permissions:
sudo cp ssmtp.conf.sample ssmtp.conf
sudo chown ssmtp:wheel . ssmtp.conf
sudo chmod 640 ssmtp.conf
[Step 8] Make the ssmtp executable owned by the ssmtp user and mark it SUID:
chown ssmtp:nogroup /usr/sbin/ssmtp
chmod 4555 /usr/sbin/ssmtp
[Step 9] Run some tests as an unprivileged user:
$ cat /etc/ssmtp/ssmtp.conf
cat: /etc/ssmtp/ssmtp.conf: Permission denied
$ sendmail firstname.lastname@example.org < /etc/rc.conf