Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Create Postfix mail user aliases UNIX
After upgrading to Jaguar and needing to re-setup UW-IMAP and then Postfix, I also needed to re-establish my aliases. Here's a quick overview on how to do it so that others don't have to struggle though it with the amount of trial and error that I did. You must have Postfix running on your system to start with! If you don't then this obviously won't work!

First, make sure the following line in the ALIAS DATABASE section of the /etc/postfix/main.cf is NOT commented out:
alias_maps = hash:/etc/aliases
I'm not a UNIX pro. Some people might want to use the NetInfo database. I've heard plusses and minuses to using it, but this method worked for me. If you have to edit the /etc/postfix/main.cf, make sure and stop and start Postfix by issuing the following commands:
% sudo Postfix stop
% sudo Postfix start
Now you should edit the /etc/aliases file. Using your favorite editor (mine is vi), edit the file:
sudo vi /etc/aliases
Aliases are rather simple to set up. You should add any aliases that you want under the heading: # Put your local aliases here. If you want to alias foo so that it is delivered to Bob's account (bob), then you would do the following:
foo: bob
You can add as many aliases as you want for a person. When you are done, you MUST run the following command for Postfix to load the aliases (starting and stopping Postfix will NOT reload the aliases file):
sudo newaliases
Now, test it out! It should be working.
    •    
  • Currently 3.20 / 5
  You rated: 4 / 5 (10 votes cast)
 
[37,197 views]  

10.3: Create Postfix mail user aliases | 5 comments | Create New Account
Click here to return to the '10.3: Create Postfix mail user aliases' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Create Postfix mail user aliases
Authored by: vogunaescht on Dec 12, '03 03:55:38PM

it's "sudo postfix start" (lowercase p)



[ Reply to This | # ]
10.3: Create Postfix mail user aliases
Authored by: iRideSnow on Dec 12, '03 04:34:33PM

I run 10.3 Server on one of my machines. The instructions for doing this are in the help system and the final steps which they say to do are:

sudo postalias /etc/aliases
sudo newaliases
sudo postfix reload

This is what I do and it works fine. The point is, just doing sudo newaliases by itself might not be enough.

Rob



[ Reply to This | # ]
Wildcard aliases?
Authored by: bryaneh on Dec 12, '03 04:35:44PM

Is there a way to use wildcards in the aliases file? (Such as all emails that have bob somewhere in the email address go to the user bob?)



[ Reply to This | # ]
Wildcard aliases?
Authored by: mike-taco on Jan 26, '04 09:31:44PM

there is a default mail destination line.

in your main.cf for postfix, you can change the
luser_relay = defaultuser@yourdomain.com

line to a user who you would like to recieve mail that would otherwise bounce.

it's not exactly wildcards, but you don't mis anything.



[ Reply to This | # ]
10.3: Create Postfix mail user aliases
Authored by: ffernandex on Feb 03, '04 03:44:09PM

actually, after editing etc/postfix/main.cf it is very recomended to use 'sudo postfix reload' instead of using stop and then start



[ Reply to This | # ]