Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
64c8863b by Mark Sapiro at 2022-06-14T19:27:23+00:00
Fix spacing in postfax vmap with alias domain.
Fixes #1001, #1013
- - - - -
c9c9b15c by Mark Sapiro at 2022-06-14T19:27:23+00:00
Merge branch 'vmap' into 'master'
Fix spacing in postfax vmap with alias domain.
Closes #1013 and #1001
See merge request mailman/mailman!1018
- - - - -
3 changed files:
- src/mailman/docs/NEWS.rst
- src/mailman/mta/postfix.py
- src/mailman/mta/tests/test_aliases.py
Changes:
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -61,6 +61,8 @@ Bugs fixed
are now decoded. (Closes #999)
* The ``mailman import21`` command now converts more template replacements and
reports to stderr any remaining unconverted replacements. (See #870)
+* The postfix generated virtual mappings now have correct spacing with
+ alias_domains. (Closes #1001 and #1013)
REST
====
=====================================
src/mailman/mta/postfix.py
=====================================
@@ -236,7 +236,7 @@ class LMTP:
for mlist in sorted(by_domain[domain], key=sort_key):
aliases = list(utility.destinations(mlist))
width = (max(len(alias) for alias in aliases) +
- len(mlist.mail_host) + 14)
+ len(mlist.true_mail_host) + 14)
for alias in aliases:
addr = '{}@{}'.format(alias, mlist.mail_host)
true_addr = self._decorate(
=====================================
src/mailman/mta/tests/test_aliases.py
=====================================
@@ -405,15 +405,15 @@ [email protected]
lmtp:[127.0.0.1]:9024
contents = _strip_header(fp.read())
self.assertMultiLineEqual(contents, """\
# Virtual mappings for the @example.org domain.
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
""")
def test_vmap_regex(self):
@@ -466,15 +466,15 @@ [email protected]
[email protected]
contents = _strip_header(fp.read())
self.assertMultiLineEqual(contents, """\
# Virtual mappings for the @example.org domain.
-/^other@example\\.org$/ [email protected]
-/^other-bounces(\\+.*)?@example\\.org$/ [email protected]
-/^other-confirm(\\+.*)?@example\\.org$/ [email protected]
-/^other-join@example\\.org$/ [email protected]
-/^other-leave@example\\.org$/ [email protected]
-/^other-owner@example\\.org$/ [email protected]
-/^other-request@example\\.org$/ [email protected]
-/^other-subscribe@example\\.org$/ [email protected]
-/^other-unsubscribe@example\\.org$/ [email protected]
+/^other@example\\.org$/ [email protected]
+/^other-bounces(\\+.*)?@example\\.org$/ [email protected]
+/^other-confirm(\\+.*)?@example\\.org$/ [email protected]
+/^other-join@example\\.org$/ [email protected]
+/^other-leave@example\\.org$/ [email protected]
+/^other-owner@example\\.org$/ [email protected]
+/^other-request@example\\.org$/ [email protected]
+/^other-subscribe@example\\.org$/ [email protected]
+/^other-unsubscribe@example\\.org$/ [email protected]
""")
def test_long_list_names(self):
@@ -491,13 +491,13 @@ [email protected]
[email protected]
contents = _strip_header(fp.read())
self.assertMultiLineEqual(contents, """\
# Virtual mappings for the @grups.mailsandbox.xxxxxx.org domain.
[email protected] [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
""") # noqa: E501
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/e0f4e6cc2690fd7494efd212dfa874b8d2f2581d...c9c9b15cd91564ef00d88d79474e029e5da58e20
--
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/e0f4e6cc2690fd7494efd212dfa874b8d2f2581d...c9c9b15cd91564ef00d88d79474e029e5da58e20
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: [email protected]