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

I want to set up a maillist consisting of several e-mail-addresses using an alias in /etc/aliases.

Is there a known limitation here with regards to number of lines/chars/entries per alias?

From what I read in the manpage I can include a file containing the addresses for that alias.

I expect some hundred addresses. If this detail is important: I am using postfix on CentOS 5 x86_64.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I've had some fairly complex /etc/aliases files on Postfix systems. The worst was 900+ lines with nested groups and references. The biggest list of recipients I had on one line was 30 or so. I haven't noticed a limit though, although there may be something hardcoded.

share|improve this answer
    
900+ is pretty much - propably enough for my purposes. But you have to do "newaliases" after changing lines... So although this answers my question I will go for the include-file. –  Nils Jun 1 '11 at 21:09

I'm not aware of what the upper limit of the aliases line length might be, and it probably depends on the mailer, postfix/sendmail/etc. But I'd recommend you using an include file where you have more entries than fingers, as it's much easier to manage and you can easily add/remove from the included file without having to rebuild your aliases database. There will be no issue with hundreds of lines in your file.

The format in your /etc/aliases is:

:include:/path/to/filename

Within the file, you have one email per line.

share|improve this answer
    
I already figured out the syntax for include. So there is no need to "newaliases" after changing the include-file? Interesting. –  Nils Jun 1 '11 at 21:06
    
@Nils - correct, newaliases is only necessary when you modify the aliases file itself, any included files can be changed independently. Well at least with both sendmail and postfix. I've not used any other MTAs. –  barryj Jun 1 '11 at 21:08

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.