1

Topic: enabling ipv6 for your iredmail (Postfix/Dovecot)

Hi All,

I am using ipv6 for my mailservers and i thought i would share it.
Please note i have used public ipv6 ip : ef80:dead::3/64 for my explaination. Please use your own ipv6 ;-)

First of all you need to have ipv6 enabled on your server. If not, contact your reseller/ISP to ask for an ipv6 block.
you may check this by typing the following in the command line :

ifconfig | grep Scope:Global

user@mailserver:~$ ifconfig | grep Scope:Global
          inet6 addr: ef80:dead::3/64 Scope:Global

In the example you can see ef80:dead::3/64 is the configured ipv6 on the server, so you can use the ip shown in your output.

  • Postfix

next, open the file : /etc/postfix/main.cf with your fevorite editor.

sudo vim /etc/postfix/main.cf

look for the following line:

inet_protocols = 

check if ipv6 is enabled
if needed, change the line to :

 inet_protocols = ipv4, ipv6 

next, look for the line:

smtp_bind_address6 =

If not found, add this line :

smtp_bind_address6 =ef80:dead::3

Whenever you make a change to the main.cf, execute the following command as root in order to refresh a running mail system:

sudo postfix reload


  • Dovecot

open the file : /etc/dovecot/dovecot.conf with your fevorite editor.

sudo vim /etc/dovecot/dovecot.conf

look for the following line:

listen = 

and add your ipv6 to it :

listen = 127.0.0.1,208.67.222.222, [ef80:dead::3] 

Where as 208.67.222.222 would be your own external ipv4.

next, restart dovecot.

sudo /etc/init.d/dovecot restart

And your set.

Check your syslog to see if all went okay.

Enjoy,

Jochie

2

Re: enabling ipv6 for your iredmail (Postfix/Dovecot)

Jochie wrote:

sudo vim /etc/postfix/main.cf

look for the following line:

inet_protocols = 

check if ipv6 is enabled
if needed, change the line to :

 inet_protocols = ipv4, ipv6 

Alternatively, you can set inet_protocols to all:

inet_protocols = all

Which will enable both IPv4 and IPv6. It will also make Postfix to automatically listen to all IPv6 addresses that are set to the system, so smtp_bind_address6 is only needed if you wish to restrict Postfix into certain addresses.