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 @@ third-unsubscr...@x.example.org lmtp:[127.0.0.1]:9024 contents = _strip_header(fp.read()) self.assertMultiLineEqual(contents, """\ # Virtual mappings for the @example.org domain. -th...@example.org th...@x.example.org -third-boun...@example.org third-boun...@x.example.org -third-conf...@example.org third-conf...@x.example.org -third-j...@example.org third-j...@x.example.org -third-le...@example.org third-le...@x.example.org -third-ow...@example.org third-ow...@x.example.org -third-requ...@example.org third-requ...@x.example.org -third-subscr...@example.org third-subscr...@x.example.org -third-unsubscr...@example.org third-unsubscr...@x.example.org +th...@example.org th...@x.example.org +third-boun...@example.org third-boun...@x.example.org +third-conf...@example.org third-conf...@x.example.org +third-j...@example.org third-j...@x.example.org +third-le...@example.org third-le...@x.example.org +third-ow...@example.org third-ow...@x.example.org +third-requ...@example.org third-requ...@x.example.org +third-subscr...@example.org third-subscr...@x.example.org +third-unsubscr...@example.org third-unsubscr...@x.example.org """) def test_vmap_regex(self): @@ -466,15 +466,15 @@ third-unsubscr...@example.org third-unsubscr...@x.example.org contents = _strip_header(fp.read()) self.assertMultiLineEqual(contents, """\ # Virtual mappings for the @example.org domain. -/^other@example\\.org$/ ot...@x.example.org -/^other-bounces(\\+.*)?@example\\.org$/ other-boun...@x.example.org -/^other-confirm(\\+.*)?@example\\.org$/ other-conf...@x.example.org -/^other-join@example\\.org$/ other-j...@x.example.org -/^other-leave@example\\.org$/ other-le...@x.example.org -/^other-owner@example\\.org$/ other-ow...@x.example.org -/^other-request@example\\.org$/ other-requ...@x.example.org -/^other-subscribe@example\\.org$/ other-subscr...@x.example.org -/^other-unsubscribe@example\\.org$/ other-unsubscr...@x.example.org +/^other@example\\.org$/ ot...@x.example.org +/^other-bounces(\\+.*)?@example\\.org$/ other-boun...@x.example.org +/^other-confirm(\\+.*)?@example\\.org$/ other-conf...@x.example.org +/^other-join@example\\.org$/ other-j...@x.example.org +/^other-leave@example\\.org$/ other-le...@x.example.org +/^other-owner@example\\.org$/ other-ow...@x.example.org +/^other-request@example\\.org$/ other-requ...@x.example.org +/^other-subscribe@example\\.org$/ other-subscr...@x.example.org +/^other-unsubscribe@example\\.org$/ other-unsubscr...@x.example.org """) def test_long_list_names(self): @@ -491,13 +491,13 @@ third-unsubscr...@example.org third-unsubscr...@x.example.org contents = _strip_header(fp.read()) self.assertMultiLineEqual(contents, """\ # Virtual mappings for the @grups.mailsandbox.xxxxxx.org domain. -llis...@grups.mailsandbox.xxxxxx.org llis...@mail-ng.xxxxxx.org -llista1-boun...@grups.mailsandbox.xxxxxx.org llista1-boun...@mail-ng.xxxxxx.org -llista1-conf...@grups.mailsandbox.xxxxxx.org llista1-conf...@mail-ng.xxxxxx.org -llista1-j...@grups.mailsandbox.xxxxxx.org llista1-j...@mail-ng.xxxxxx.org -llista1-le...@grups.mailsandbox.xxxxxx.org llista1-le...@mail-ng.xxxxxx.org -llista1-ow...@grups.mailsandbox.xxxxxx.org llista1-ow...@mail-ng.xxxxxx.org -llista1-requ...@grups.mailsandbox.xxxxxx.org llista1-requ...@mail-ng.xxxxxx.org -llista1-subscr...@grups.mailsandbox.xxxxxx.org llista1-subscr...@mail-ng.xxxxxx.org -llista1-unsubscr...@grups.mailsandbox.xxxxxx.org llista1-unsubscr...@mail-ng.xxxxxx.org +llis...@grups.mailsandbox.xxxxxx.org llis...@mail-ng.xxxxxx.org +llista1-boun...@grups.mailsandbox.xxxxxx.org llista1-boun...@mail-ng.xxxxxx.org +llista1-conf...@grups.mailsandbox.xxxxxx.org llista1-conf...@mail-ng.xxxxxx.org +llista1-j...@grups.mailsandbox.xxxxxx.org llista1-j...@mail-ng.xxxxxx.org +llista1-le...@grups.mailsandbox.xxxxxx.org llista1-le...@mail-ng.xxxxxx.org +llista1-ow...@grups.mailsandbox.xxxxxx.org llista1-ow...@mail-ng.xxxxxx.org +llista1-requ...@grups.mailsandbox.xxxxxx.org llista1-requ...@mail-ng.xxxxxx.org +llista1-subscr...@grups.mailsandbox.xxxxxx.org llista1-subscr...@mail-ng.xxxxxx.org +llista1-unsubscr...@grups.mailsandbox.xxxxxx.org llista1-unsubscr...@mail-ng.xxxxxx.org """) # 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 -- mailman-checkins@python.org To unsubscribe send an email to mailman-checkins-le...@python.org https://mail.python.org/mailman3/lists/mailman-checkins.python.org/ Member address: arch...@jab.org