sendmail aliasing in .mailrc. Can it be done???

Guy Harris guy at sun.uucp
Fri Jan 17 06:23:53 AEST 1986


> I have a general question about sendmail. We have sendmail running on our 
> sysV.2 systems. I would like to know if each user could do aliasing from a
> .mailrc file INSTEAD of putting it in the system alias file. I am not 
> interested in putting one into the .cshrc file, as many of our users are
> running bourne shell, not cshell. 

Unfortunately, the term "aliasing" has at least 3 different meanings.  The
first is aliasing done by "sendmail"; this is specified in the
"/usr/lib/aliases" file.  You can also do forwarding; if a user has a file
called ".forward" in their home directory, all mail to them is instead sent
to the list of addresses given in that file, just as if their name had been
an alias for the text in that file.

The second is aliasing done by Mail, which is the program that reads .mailrc
("sendmail" does not look at .mailrc files).  Any aliases put into .mailrc
apply to all mail sent out by that user.  However, there is a small
difference.  If my /usr/lib/aliases file has the alias

	list: user1,user2,user3

and I send to "list", the mail will get delivered to users "user1", "user2",
and "user3" (which can be any addresses, including users on other machines,
aliases in /usr/lib/aliases, and programs or files), but the "To:" line will
read

	To: list

However, if my .mailrc has the alias

	alias list user1,user2,user3

and I send to "list", the mail will still get delivered to users "user1",
"user2", and "user3" (which can be any addresses which Mail - not "sendmail"
- recognizes), bu the "To:" line will read

	To: user1, user2, user3

The two forms of aliasing are done at different times, and by different
programs; aliases in "/usr/lib/aliases" are expanded by "sendmail", and
aliases in ".mailrc" are expanded by "Mail".  So the strict answer is "no,
'sendmail' aliasing can't be done in '.mailrc', but yes, you can do aliasing
in '.mailrc'."

The third one (I am presuming by your reference to .cshrc) is C shell
command aliasing, which has nothing to do with mail; it just happens also to
be called "aliasing".

	Guy Harris



More information about the Comp.unix.wizards mailing list