Score:0

SSMTP: Map local user (UID greater than 1000) to an external email address

mp flag

I've configured SSMTP to send system messages for users with a UID < 1000 in /etc/ssmtp/ssmtp.conf:

[email protected]
rewriteDomain=mydomain.com

If I send an email to root (echo test | sendmail -v root) for example it gets properly delivered to [email protected] (as per root in /etc/ssmtp/ssmtp.conf).

However this doesn't work for user accounts with UIDs greater than 1000. If I send an email to localuser by typing echo test | sendmail -v localuser it'll be sent to [email protected] which is not what I want (/etc/ssmtp/revaliases is configured properly but it's only useful if you want to change the FROM, not the TO as in this case).

I've tried changing /etc/mail.rc (by adding alias localuser localuser<[email protected]>) and using echo test | mail -s "testing ssmtp" localuser instead of sendmail but this doesn't work either.

Does anyone know how to map local UNIX user accounts with UIDs greater than 1000 to specific external email addresses using SSMTP?

Paul avatar
cn flag
sSMTP outwardly appears unmaintained. You might consider a different tool.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.