0

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

root=to@mydomain.com
rewriteDomain=mydomain.com

If I send an email to root (echo test | sendmail -v root) for example it gets properly delivered to to@mydomain.com (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 localuser@mydomain.com 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<yourname@domain.com>) 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?

manifestor
  • 5,329
  • 5
  • 21
  • 33

0 Answers0