The NetBSD project is a good place to start when looking for a mail server. Straight forward and precise, NetBSD can power some of the largest networks on the internet. To install NetBSD, follow the easy to understand installation wizard. There are several differences found in NetBSD than FreeBSD or OpenBSD.
Simply add these configuration settings to the rc.conf file in /etc
rc_configured=YES
ifconfig_fxp0=192.168.0.10/24
ifconfig_fxp1=10.1.10.100/24
sshd=YES
hostname=mail.nvita.org
sendmail_enable=yes
defaultroute=10.1.10.1
samba=YES
smbd=YES
nmbd=YES
As you can you see here, ifconfig_fxp1 incorporates the input "inet" and "netmask" but in IP notation, where the subnet mask is abriviated. These provisions are an example of how NetBSD is a viable network operating system. For example, make sure the correct default route is listed correctly. To list the correct default route, make sure the entry coresponds to the interface that will answer internet data.
If your internet service provider includes equipment which assigns a dynamic ipaddress, update the address:pkg_add ftp://ftp.netbsd.org/pub/NetBSD/packages/current-packages/NetBSD-4.0/i386/All/postfix-2.6.20080903.tgz
Find the correct postfix configuration file with the find command:
find / -name "master.cf"
/usr/share/examples/postfix/master.cf
/usr/pkg/share/examples/postfix/master.cf
/usr/pkg/etc/postfix/master.cf
/usr/local/sbin/master.cf
/var/db/pkg.refcount/files/usr/pkg/etc/postfix/master.cf
/etc/postfix/master.cf
The default configuration file that postfix will use is located in the /etc directory. The master.cf configuration file determines what network interfaces to use. Here, we would like to use all the available interfaces such that users are able to send mail on the internal network as well as the external network:
vi /etc/postfix/master.cf
Press the ESC key
Type :ins
Type: smtp inet n - n - - smtpd
Strike CTRL - CPress the ESC key
Type: wq!
Next modify the main.cf file in the /etc directory:
Type vi /etc/postfix/main.cf
Press the ESC key
Type :ins
Type:
myhostname = mail.nvita.org
inet_interfaces = mail.nvita.org
mydomain = nvita.org
myorigin = mail.nvita.org
virtual_alias_maps= hash:/etc/postfix/virtual
virtual_alias_domains = nvita.org, inverselog.com, giantfood.nl
mynetworks = 192.168.0.0/24, 127.0.0.0/8, 10.1.10.0/24
Strike the ENTER key
Strike CTRL - C
Press the ESC key
Type :wq!
Next, create the file /etc/postfix/virtual:
Type vi /etc/postfix/virtual
Press the ESC key
Type :ins
@nvita.org squirrel
mkearney@nvita.org squirrel
Strike the ENTER key
Strike CTRL - C
Press the ESC key
Type :wq!
Now create the virtual user database used by the postfix deamon:
postmap virtual