I've found on a couple servers that have the following entry in /etc/aliases
:
root: \root,[email protected]
You can send mail to /dev/null
like this:
root: /dev/null
I can't find \root
used in any documentation.
- Does
\root
do anything? - Could it be a syntax error?
The backslash "escapes" the token following, preventing further interpretation.
It's an important mechanism in defining aliases like the example in your post, where "root" is aliased to include both the account of that name AND other addresses. Without the \ a loop would be created when the program interpreting the alias tried to dereference "root", which includes as a member "root" (which includes as a member "root", and so on..)
I believe that
\root
prevents that id from being passed through aliases again and (instead is) delivered to the LOCAL root account.\root
will save the message to (for example)/var/mail/root
and forward it to[email protected]
. Without it, only[email protected]
will receive the message. The\user, other@address
notation is very common for users that use~/.forward
files.Putting a backslash (\) in front of the username in the first recipient is a special syntax for delivering mail to the local mail spool with no further aliasing.
Here, user
root
is forwarding mails to two different places:Please find details here.