Sam:
> Hello!
>
> I have a server running FreeBSD 8.1 with FreeBSD 8.1 jails running on it. I
> have
> ipv6 running on both the main server and jails and that is all fine.
>
> I'm running into a strange problem when it comes to postfix though and was
> wondering if anyone has any clues. What's happening is that postfix will not
> start automatically when the jail is started when 'inet_protocols' is set to
> either 'all' or 'ipv4, ipv6'. The error in the logs is: fatal: bind :: port
> 25:
> Can't assign requested address.
Translation: the attempt to bind to "::" port 25 failed, because
the jail network interface does not have an IPv6 address.
This means that Postfix is started before the network address is
configured on the jail interface.
> The odd thing is that I can enter the jail right away and start
> postfix from the command line and it works fine. Also, if I specify
> the '-D' flag in rc.conf and set the debug command in main.cf to
> 'sleep 3' then postfix will start automatically when the jail is
> started.
You have a race condition where Postfix is started before the jail
network interface is fully initialized.
The workaround is to insert some delay before Postfix starts.
The solution is to file a bug report with FreeBSD. The /etc/rc.d
scripts must not start network daemons before the network is ready.
Wietse