[CentOS] Complex sendmail alias handling.

Les Mikesell lesmikesell at gmail.com
Fri Mar 23 22:33:43 UTC 2007


Hugh E Cruickshank wrote:
> From: Les Mikesell Sent: March 23, 2007 14:22
>> I usually handle group addresses as :include: files in sendmail aliases 
>> just to make them easier to edit and avoid the need to rebuild the 
>> aliases db after changes.  All you need is a program to generate the 
>> right list at the right times into a tmp name on the same file system, 
>> then mv's to the included name for an atomic cutover.  You are better 
>> off keeping that logic separate from anything else.  In fact it doesn't 
>> even have to be logical if you put copies of the files where the 
>> appropriate shift supervisor or equivalent can edit them.
>>
> 
> I was not aware of the :include: files. That does sound interesting
> and I will definitely check it out.

Just make an alias entry with:
aliasname: :include:/path/to/file

and run newaliases.  Then you can edit the file any time to change that 
list.  I sometimes give the files .txt extensions and put them somewhere 
with samba access so others can edit with windows/notepad.  Sendmail 
doesn't seem to care about the line endings - just make sure it has read 
access permission.  Also, if you didn't already know, aliases can 
include other aliases and sendmail will recurse until things stop 
expanding, weeding out any duplicates so if you have a common group with 
a few others you can put the common group in one list, then mention its 
alias in the others along with their unique entries.


-- 
   Les Mikesell
    lesmikesell at gmail.com



More information about the CentOS mailing list