3

There are plenty of examples of how to use aliases to send email to multiple addresses, but I'm interested in sending to an internal name and an external address.

For example, this doesn't work, but the external address does get root messages:

root: root,SomeOtherAddress@email.com

I've also tried this, but get an access denied error is thrown trying to append to the file:

root: /var/mail/root,SomeOtherAddress@email.com

I'd like to keep a record of root's messages where they would normally be, and also send a copy to an external address.

Suggestions?

Thanks.

AnFi
  • 5,883
  • 1
  • 12
  • 26

1 Answers1

3

Redirect root email to non-privileged local user.

root: localuser,SomeOtherAddress@email.com

Root emails are usually redirected by alias to selected non-privileged local account.
Delivery to mailbox-file owned by root is a needless security risk.
It is almost always a good idea to keep local copies of root emails.

Aliases with "self delivery" require another syntax to avoid "alias loops breaking".
Sendmail by sendmail.org accepts:

user: \user, SomeOtherAddress@email.com
AnFi
  • 5,883
  • 1
  • 12
  • 26