Como postado no link aqui é a resposta. Eu sei ot não é recomendado para editar arquivos * cf diretamente para você saber o drill. Espero que ajude alguém lá fora.
smarthost=mail.sample.com
user=me
[email protected]
/opt/csw/bin/gsed -i "s/^DS[\s]*.*/DS $smarthost/g" /etc/mail/submit.cf
/opt/csw/bin/gsed -i "s/^DS[\s]*.*/DS $smarthost/g" /etc/mail/sendmail.cf
/opt/csw/bin/gsed -i "/$user:/d" /etc/aliases
echo "$user:$alertlist" >> /etc/aliases
/opt/csw/bin/gsed -i "/root:/d" /etc/aliases
echo "root:$alertlist" >> /etc/aliases
svcadm restart sendmail
echo "So that we never miss again an important communication from servers" | mailx -s "'hostname' As a sysadmin I want to receive my user mail notifications in my personal email address" me
echo "So that we never miss again an important communication from servers" | mailx -s "'hostname' As a sysadmin I want to receive root mail notifications in my personal email address" root