This tutorial was written for linux users.
- Download the newest Postfix tar.gz source code package from postfix.org
- Add the following line to your /etc/passwd file:
postfix:*:12345:12345:postfix:/no/where:/no/shell
- Add the following two lines to your /etc/group file:
postfix:*:12345:
postdrop:*:54321:
- Install Postfix:
cp postfix*.tar.gz /usr/local/
cd /usr/local/
gzip -dc postfix*.tar.gz | tar xvf -
cd postfix*/
make
make install (I used all default values which are prompted during 'make install')
- Direct your attention to /etc/postfix. This contains both main.cf (the postfix config file) and virtual (the file which will contain the email addresses and the usernames to which they're mapped).
- In /etc/postfix/main.cf, make the following modifications:
1. Add the following lines: virtual_alias_domains = myFirstDomain.com mySecondDomain.net
virtual_alias_maps = hash:/etc/postfix/virtual 2. Add the following line: myhostname = smtp.myFirstDomain.com This should be a fully qualified domain name for your email server.
3. If you wish to restrict relaying to the localhost (strongly recommended), add the following: mynetworks = 127.0.0.0/8
- Modify /etc/postfix/virtual to include all email addresses you wish to include (and have been added to the $virtual_alias_domains list in main.cf. Example:
bill@myFirstDomain.com bill
ted@mySecondDomain.net ted
- Run /usr/sbin/postmap /etc/postfix/virtual (this must be done each time the virtual file is modified).
- To run the server, execute: /usr/sbin/postfix start
done!
|