Add an alias with all users in postfix

Question: 

How to create an alias, for example, allusers@domain.com, where the email sent to allusers@comain.com reaches all the users available in the posrfix server?

Answer:

Do the following.

1.
find /home/* -maxdepth 0 | cut -d’/’ -f3 > /etc/mail/team

2. add the following line in the file  /etc/aliases
allusers: :include:/etc/mail/team

3. run the following command
newaliases

4. run this command too
/etc/init.d/postfix reload

You have to do this, whenever a new user is added to the server.

One thought on “Add an alias with all users in postfix

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s