Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable IPv6 for Postfix #420

Merged
merged 1 commit into from
Nov 9, 2014

Conversation

zamoose
Copy link
Contributor

@zamoose zamoose commented Aug 15, 2014

@daveross came across an interesting bug with the default configuration -- since the inet_protocols defaults to "all", some network configurations will default to trying IPv6 and then giving up when an MX record won't resolve to it. (Try it yourself -- send to addresses at 10up.com vs. get10up.com). Disabling IPv6 and forcing IPv4 for all smtp connections seems to make this work correctly.

@daveross came across an interesting bug with the default configuration -- since the `inet_protocols` defaults to "all", some network configurations will default to trying IPv6 and then giving up when an MX record won't resolve to it. (Try it yourself -- send to addresses at 10up.com vs. get10up.com). Disabling IPv6 and forcing IPv4 for all smtp connections seems to make this work correctly.
@jeremyfelt jeremyfelt added this to the 1.2 Release milestone Nov 9, 2014
@jeremyfelt
Copy link
Member

Looks good, thanks for waiting. :)

It may be worth moving to an external config file at some point, but I'm not sure how much we'll ever config postfix after this.

jeremyfelt added a commit that referenced this pull request Nov 9, 2014
@jeremyfelt jeremyfelt merged commit 2c7c074 into Varying-Vagrant-Vagrants:master Nov 9, 2014
jeremyfelt added a commit that referenced this pull request Mar 4, 2017
In #420, we added a line to provisioning that attempts to set
"ipv4" as the only allowed protocol for postfix due to issues in
how network connections managed the ipv6 connection.

Because the config file does not yet exist during initial
provisioning, that caused an error message saying as much. See #628.

It turns out that this line hasn't been doing anything. :)

I first went down the path of using `debconf-set-selections` to
set the protocol value. This works, but then disables ipv6 entirely
as a valid protocol. Since we haven't heard of any other issues
besides the original in #420, I think it's safe to not make any
change here and then watch for any problems.

I have a feeling that postfix has gotten better about this. In the
documentation for the `inet_protocols` config, it's mentioned that
"versions before 2.8 attempt to connect via IPv6 before attempting
to use IPv4."

http://www.postfix.org/postconf.5.html#inet_protocols

Now that we're past 2.8, it's entirely possible that the protocol
detection has gotten better. If we do run into an issue, there is
a newer `smtp_address_preference` config that allows us to specify
which protocol should be attempted first.

http://www.postfix.org/postconf.5.html#smtp_address_preference

In that case, we may need to create our own custom config file as
it's not entirely obvious that `debconf-set-selections` will work
for this value.

See #420.
Fixes #628.
tomjn pushed a commit to tomjn/varying-vagrant-vagrants that referenced this pull request Mar 7, 2017
In Varying-Vagrant-Vagrants#420, we added a line to provisioning that attempts to set
"ipv4" as the only allowed protocol for postfix due to issues in
how network connections managed the ipv6 connection.

Because the config file does not yet exist during initial
provisioning, that caused an error message saying as much. See Varying-Vagrant-Vagrants#628.

It turns out that this line hasn't been doing anything. :)

I first went down the path of using `debconf-set-selections` to
set the protocol value. This works, but then disables ipv6 entirely
as a valid protocol. Since we haven't heard of any other issues
besides the original in Varying-Vagrant-Vagrants#420, I think it's safe to not make any
change here and then watch for any problems.

I have a feeling that postfix has gotten better about this. In the
documentation for the `inet_protocols` config, it's mentioned that
"versions before 2.8 attempt to connect via IPv6 before attempting
to use IPv4."

http://www.postfix.org/postconf.5.html#inet_protocols

Now that we're past 2.8, it's entirely possible that the protocol
detection has gotten better. If we do run into an issue, there is
a newer `smtp_address_preference` config that allows us to specify
which protocol should be attempted first.

http://www.postfix.org/postconf.5.html#smtp_address_preference

In that case, we may need to create our own custom config file as
it's not entirely obvious that `debconf-set-selections` will work
for this value.

See Varying-Vagrant-Vagrants#420.
Fixes Varying-Vagrant-Vagrants#628.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants