Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 sendmail.mc or to include additional addresses from another file?

share|improve this question

2 Answers 2

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 sendmail.mc file to use a common-delimited list of alias files, and then regenerate your sendmail.cf. 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

 
discard

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.