The inet_protocols configuration
The inet_interfaces configuration
To install Postfix from source code there are required:
perl
gcc
db*-devel
libdb4.7-dev
Open Terminal and log into superuser. To install above packages type into the command line:
- for debian-like systems:
apt-get install perl gcc db*-dovel libdb4.7-dev
- for redhat-like systems:
yum install perl gcc db*-dovel libdb4.7-dev
- for suse systems:
zypper install perl gcc db*-dovel libdb4.7-dev
After the installation of packages and dowloading the source code from the vendor's site, go to the directory where Postfix is dowloaded.
Unpack the dowloaded content using:
tar xzf name_of_dowloaded_postfix.tar.gz
Next go to directory of where Postfix is unpacked. Enter the command:
make
Afterwards create a new user and group by typing:
groupadd name_of_the_group
and
useradd name_of_the_user
For exemple: groupname - postdrop and username - postfix.
Then use a command:
make install
For every single question press "Enter". When there is a question about mail_owner or setgid_group - type used username and name of the group.
apt-get install postfix
yum install postfix
zypper install postfix
postfix status
If Postfix is started, there will be information aboud PID like bellow:
Find the line witch "inet_protocols". The default value is "ipv4" (as below):
Depending on wheter the server should run on both protocols or only on IPv6, change the value of "inet_protocols" to "all" (Dual Stack case) or "ipv6 (Native IPv6 case).
Check the value of "inet_interfaces":
If the value is different then "all", add an address where Postfix server should listen to (e.g. "2001:db8::45). The value "all" means Postfix server listens to :::25 for IPv6 and 0.0.0.0:25 for IPv4.
Restart the Postfix server. To verify the configuration use a command:
netstat -ano | grep :25
It will display if and on what adresses Postfix is listening (assuming 25 port is the port for Postfix server). The result should look like this:
Now Postfix server is running with IPv6.