Name

AliasFile

Synopsis

The AliasFile option must be declared for sendmail to do aliasing. If you omit this option, sendmail might silently assume that you do not want to do aliasing at all. There is no default compiled into sendmail for the location of the aliases file.[9] For mc configurations, an appropriate default will be defined based on your operating system.

If you specify a file that doesn’t exist (such as /et/mail/aliases if you really meant /etc/mail/aliases) or one that is unreadable, sendmail complains with, for example:

Can't open /et/mail/aliases

This is a nonfatal error. The sendmail program prints it and continues to run but assumes that it shouldn’t do aliasing.

The forms of the AliasFile option are as follows:

O AliasFile=location           configuration file (V8.7 and later) 
-OAliasFile=location           command line (V8.7 and later) 
define(`ALIAS_FILE',`location')    mc configuration (V8.7 and later) 
OAlocation                     configuration file (deprecated) 
-oAlocation command line (deprecated) 

The location is an argument of type string and can be an absolute or a relative pathname. A relative path (such as ../aliases) can be used for testing but should never be used in the production version of your sendmail.cf file. To do so opens a security hole. Such a path is interpreted by sendmail as relative to the queue directory.

This option can be used to change the name of the aliases file (a possible consideration for security). If you change the location or name of the aliases file, be aware ...

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.