Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've run into an issue with a piece of third party software that creates it's own alias file to be used by sendmail. Looking through the configuration options, google, and the man pages it seems like I can only define one alias file which means either I only get all the software's addresses or all of the local aliases.

I have tried appending my own entries to the software's alias file but it gets rebuilt everytime there is a change of addresses and my entries get blown away.

My question is, is there a way to define addional alias files in or to include additional addresses from another file?

share|improve this question
up vote 1 down vote accepted

If you read the Sendmail documentation, you'll find:

ALIAS_FILE  [/etc/mail/aliases] The location of the text version of the
alias file(s). It can be a comma-separated list of names (but be sure you
quote values with commas in them -- for example, use define(`ALIAS_FILE',
`a,b') to get "a" and "b" both listed as alias files; otherwise the
define() primitive only sees "a").

So, you can edit your file to use a common-delimited list of alias files, and then regenerate your And restart Sendmail.

share|improve this answer
This did the trick. Thanks a bunch – TrueDuality Dec 4 '09 at 14:32

You can't have a second aliases file, but you can include a file using the syntax

    :include: /path/name 
So define all your aliases in your aliases file, and then include the one created by your software.

share|improve this answer
I tried add the following line exactly to my /etc/aliases file: ":include: /etc/mail/list_aliases" and ran newaliases. It gave me the following error: "/etc/aliases: line 99: :include: /etc/mail/list_aliases... illegal alias name" – TrueDuality Dec 3 '09 at 16:03
After looking up the syntax it seems that the :include: statement is a destination for an alias but can not define aliases themselves – TrueDuality Dec 3 '09 at 16:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.