Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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:


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

I just ran into a limitation, I think it is 1024 bytes for one alias. "newaliases" reports this but I missed it and it took me a while of confusion when I could not send mail to this particular alias. I edit the /etc/alias file, I do not use "include". My system is FreeBSD 10.1 using sendmail.

share|improve this answer
Since I asked for CentOS - can you confirm that there, too? – Nils Mar 6 at 10:30

Your Answer


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.