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

iam running a postfix mailserver with 2 domains, one real and one virtual domain with Virtual Users, my question is how can i send a "admin message" to all Users of my Mailserver? So i can inform them about Updates/Downtimes ect.

share|improve this question
up vote 1 down vote accepted

You need to create a distribution list or alias that points to all users. If you are configuring Postfix manually, you can create a new list in /etc/aliases, for example:

allusers: user1, user2, user3

...and just include all users in that alias. Don't forget to use newaliases when you've saved your new /etc/aliases file (should be force of habit by now). You should create scripts to automatically maintain such a distribution list that know how to enumerate all the users on your system. For example if all valid users are in /etc/passwd, you could parse that, or if they all have home directories in /home/, you could list those.

This can be a pain to maintain. You can achieve the same result with a Mailman mailing list using the command-line mailman tools, but you still need to maintain the list of users yourself. More on those here:

If you are using a GUI administration tool, such as webmin or cpanel, etc., they all have a "send mail to all users" feature.

If you use LDAP as a backend for postfix or to store information about users, mail accounts, mail aliases, and mailing lists, you can create a mailing list/alias using something like a "dynamic group" in LDAP (Google for LDAP dynamic group) and have the abovementioned distribution list automatically generate by your LDAP server. It doesn't sound like you're using LDAP though...

Unfortunately, in the general case of a manually-configured Postfix on a system with potentially many local users, Postfix doesn't necessarily have an enumeration of users ahead of time. For example, it may have to look the username up in getpwent, LDAP, etc. on-demand as mail arrives, depending on your configuration. Sorry to be the bearer of bad news.

EDIT: By the way, if you use the /etc/aliases method, be sure to create a special filter rule for that address in your spam filter to prevent mail coming from the outside from going to it. That way you won't make it easy for spammers.

share|improve this answer

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.