Adding mail aliases

David G. Miller dave at davenjudy.org
Tue Jan 7 20:51:31 UTC 2014


Robert Moskowitz <rgm <at> htt-consult.com> writes:

> 
> So I have been taught it is not enough to edit /etc/aliases, you also 
> have to run newaliases to update /etc/aliases.db.  Both these files 
> exist in the base install, along with mailx.  But newaliases does NOT 
> exist.  A 'quick' yum whatprovides shows that newaliases is installed 
> along with any of:  exim, sendmail, postfix, or ssmtp  :(
> 
> So does mailx use /etc/aliases.db?  If it does, why no newaliases, and 
> how to install only newaliases, not a whole MTA?
> 
> Well for now, I can quite live with root mail going to root's maildir.
> 
>From the mailx man page:

Personal and systemwide distribution lists

It is also possible to create a personal distribution lists so that, for
instance, the user can send mail to 'cohorts' and have it go to a group of
people. Such lists can be defined by placing a line like

        alias cohorts bill ozalp jkf mark kridle at ucbcory

in the file .mailrc in the user's home directory. The current list of such
aliases can be displayed with the alias command in mailx. System wide
distribution lists can be created by editing /etc/aliases, see aliases(5)
and sendmail(8); these are kept in a different syntax. In mail the user
sends, personal aliases will be expanded in mail sent to others so that they
will be able to reply to the recipients. System wide aliases are not
expanded when the mail is sent, but any reply returned to the machine will
have the system wide alias expanded as all mail goes through sendmail. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So, the answer is that you can create aliases in mailx but these are
different than /etc/aliases.  Sounds like a historical artifact that came
into existence when mailx was created as mail eXtended and it was reasonable
to just want to send mail to folks who resided on the same system as you
with no MTA involved.

Cheers,
Dave



More information about the users mailing list