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?
You can't have a second aliases file, but you can include a file using the syntax
So define all your aliases in your aliases file, and then include the one created by your software.If you read the Sendmail documentation, you'll find:
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.
Aliases of the form
take their email targets from the contents of alias_file. Put each email address on a separate line.
For instance, if /usr/local/etc/my_list contains a list of addresses that you want to alias as "myfriends", you would use this entry in /etc/aliases:
with my_list containing legal email addresses one per line like this