* [pmg-devel] [PATCH pmg-api] reinject_email: fix connecting for ipv6-only hosts
@ 2020-10-29 17:49 Stoiko Ivanov
2020-11-18 7:11 ` [pmg-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2020-10-29 17:49 UTC (permalink / raw)
To: pmg-devel
When configuring PMG only with ipv6 addresses, reinject_email after processing
fails to connect to the postfix/smtpd instance (with EINVAL).
Setting the host to '::FFFF:127.0.0.1' fixes the issue.
Tested with:
* an ipv6only host (no ipv4 configured)
* a host with ipv6 disabled via sysctl:
```
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
```
* a host with dual-stack setup
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
reported via community forum:
https://forum.proxmox.com/threads/unable-to-connect-to-localhost-at-port-10025.78199/
src/PMG/Utils.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
index d0654e1..c5cf7b8 100644
--- a/src/PMG/Utils.pm
+++ b/src/PMG/Utils.pm
@@ -211,7 +211,7 @@ sub reinject_mail {
my $resmess;
eval {
- my $smtp = Net::SMTP->new('127.0.0.1', Port => 10025, Hello => $me) ||
+ my $smtp = Net::SMTP->new('::FFFF:127.0.0.1', Port => 10025, Hello => $me) ||
die "unable to connect to localhost at port 10025";
if (defined($xforward)) {
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pmg-devel] applied: [PATCH pmg-api] reinject_email: fix connecting for ipv6-only hosts
2020-10-29 17:49 [pmg-devel] [PATCH pmg-api] reinject_email: fix connecting for ipv6-only hosts Stoiko Ivanov
@ 2020-11-18 7:11 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-11-18 7:11 UTC (permalink / raw)
To: Stoiko Ivanov, pmg-devel
On 29.10.20 18:49, Stoiko Ivanov wrote:
> When configuring PMG only with ipv6 addresses, reinject_email after processing
> fails to connect to the postfix/smtpd instance (with EINVAL).
>
> Setting the host to '::FFFF:127.0.0.1' fixes the issue.
>
> Tested with:
> * an ipv6only host (no ipv4 configured)
> * a host with ipv6 disabled via sysctl:
> ```
> net.ipv6.conf.all.disable_ipv6=1
> net.ipv6.conf.default.disable_ipv6=1
> net.ipv6.conf.lo.disable_ipv6=1
> ```
> * a host with dual-stack setup
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> reported via community forum:
> https://forum.proxmox.com/threads/unable-to-connect-to-localhost-at-port-10025.78199/
>
> src/PMG/Utils.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-18 7:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 17:49 [pmg-devel] [PATCH pmg-api] reinject_email: fix connecting for ipv6-only hosts Stoiko Ivanov
2020-11-18 7:11 ` [pmg-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal