Next, add new users to the system, since you don't want to use the root account for your daily work (yes, we're serious about that!). NetBSD offers the useradd(8) utility to create user accounts. Accounts that can su(1) to root are required to be in the "wheel" group. This can be done when the account is created by specifying a secondary group:
useradd -m -G wheel squirrel
passwd squirrel
Start the postfix server:
/etc/rc.d/postfix start
Now the SMTP server should respond to quires. You can check the status of the process by using the netstat command:
netstat -a
tcp 0 0 mail.smtp *.* LISTEN
tcp 0 0 mail.smtp *.* LISTEN
tcp 0 0 localhost.smtp *.* LISTEN
If the server does not respond to your configuration, most likely you have added addtional perameters to the configuration file. If this configuration is modified for any reason, postfix will fail.
Next install a POP deamon to check the virtual mailboxes:
pkg_add -R ftp://ftp.netbsd.org/pub/NetBSD/packages/current-packages/NetBSD-4.0/i386/All/dovecot-1.1.6.tgz
Find the correct dovecot configuration with the find command:
find / -name "dovecot.conf"
/usr/pkg/etc/dovecot.conf
/var/db/pkg.refcount/files/usr/pkg/etc/dovecot.conf
The default configuration file that postfix will use is located in the /usr/pkg/etc/ directory. The dovecot.conf configuration file determines what network interfaces to use. Here, we would like to use all the available interfaces such that users are able to retrive mail on the internal network as well as the external network:
vi /usr/pkg/etc/dovecot.conf
Press the ESC key
Type :ins
protocol pop3 {
listen = *:110
}
Strike the ENTER key
Strike CTRL - C
Press the ESC key
Type :wq!
Start the POP deamon:
dovecot start
If you would like to add additional users, use the useradd utility:
useradd -m -G wheel mkearney
passwd mkearney
Then modify the /etc/postfix/virtual file and create the database once more:
postmap virtual
Make sure your DNS server is setup correctly to direct mail to your new server. Zoneedit.com makes this easy:
Now you can configure a client e-mail program to use the new mail server. Microsoft Outlook is a fairly good client and is easy to setup.
Click Tools, Options:
Click Mail Setup, Email Accounts
Click New
Click Next and enter the account information:
Click Next
Click Next
Click Finish, Close, OK