You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mailu/towncrier/newsfragments
bors[bot] c2d85ecc32
Merge #2325
2325: postfix: wrap IPv6 CIDRs in square brackets for RELAYNETS r=mergify[bot] a=pommi

## What type of PR?

bug-fix

## What does this PR do?

This PR wraps IPv6 CIDRs in the `RELAYNETS` environment variable in square brackets for the postfix configuration.

The `RELAYNETS` environment variable is used for configuring both postfix `mynetworks` and rspamd `local_networks`. Postfix requires IPv6 addresses to be wrapped in square brackets (eg. `[2001:db8::]/64`).

When an IPv6 address is not wrapped in square brackets in the postfix configuration for `mynetworks` it results in this error while processing an incoming email from an IPv6 sender:
```
postfix/smtpd[340]: warning: 2001:db8::/64 is unavailable. unsupported dictionary type: 2001
postfix/smtpd[340]: warning: smtpd_client_event_limit_exceptions: 2001:db8::/64: table lookup problem
```

The sender sees an error and the incoming email is refused:
```
451 4.3.0 <unknown[2001:xxx:xxx:xxx:xxx:xxx:xxx:xxx]>: Temporary lookup failure
```

I tried to work around this issue by wrapping the IPv6 CIDR in square brackets in the `RELAYNETS` environment variable, but it segfaults rspamd, because it can't deal with this non-standard IPv6 notation used by postfix:
```
kernel: [4305632.603704] rspamd[1954299]: segfault at 0 ip 00007fb848983871 sp 00007ffe02cc6d1
8 error 4 in ld-musl-x86_64.so.1[7fb848948000+48000]
```

### Related issue(s)
- #2293
- #2272

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

**No changelog or documentation necessary for this minor change.**

Co-authored-by: Pim van den Berg <pim@nethuis.nl>
3 years ago
..
224.feature Ask users to check their DNS records 3 years ago
2099.bugfix Create 2099.bugfix 3 years ago
2117.bugfix Fix #2117. Gpg-agent package was missing for roundcube image. 3 years ago
2121.misc Add newsfragment for PR #2121. 3 years ago
2124.bugfix Tag for release is correctly tagged to branch x.y. 3 years ago
2125.bugfix towncrier 3 years ago
2135.bugfix towncrier 3 years ago
2138.bugfix Fix 2138: Pin DANE with the full cert 3 years ago
2141.bugfix Create 2141.bugfix 3 years ago
2185.doc Create 2185.doc 3 years ago
2193.bugfix Create 2193.bugfix 3 years ago
2195.bugfix Create 2195.bugfix 3 years ago
2196.bugfix Create 2196.bugfix 3 years ago
2199.bugfix Update 2199.bugfix 3 years ago
2207.bugfix Add bugfix description 3 years ago
2210.bugfix Create 2210.bugfix 3 years ago
2211.misc Ensure we use IMAP IDLE like it's supposed to work 3 years ago
2213.feature typo 3 years ago
2214.doc Update fail2ban faq doc 3 years ago
2239.bugfix towncrier 3 years ago
2249.bugfix Fix broken setup. Not all dependencies were pinned. As usual a dependency had a breaking update. 3 years ago
2260.bugfix towncrier 3 years ago
2278.feature Changelog 3 years ago
2281.bugfix Create 2281.bugfix 3 years ago
2284.bugfix Create 2284.bugfix 3 years ago
2302.bugfix create PR2302 changelog 3 years ago
2325.bugfix postfix: wrap IPv6 CIDRs in square brackets for RELAYNETS 3 years ago
2338.misc towncrier fragment 2338 about X-XSS-Protection removal 3 years ago
2346.bugfix Silence some errors in nginx 3 years ago