From 785a38c8b0567428f8f75e6b2c277d8a4b8d8a46 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 3 Jul 2023 09:48:50 +0200 Subject: [PATCH] improve deprecation warning about localpart-only destinations a bit it's still not great. better to automatically change domains.conf. but that would currently rewrite the whole file, which may not be what admins that manually edit expect, it would remove their comments. we need better config-update code. for issue #40 --- mox-/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mox-/config.go b/mox-/config.go index ae9c2d5..30cd640 100644 --- a/mox-/config.go +++ b/mox-/config.go @@ -1132,7 +1132,7 @@ func prepareDynamicConfig(ctx context.Context, dynamicPath string, static config if !ok { addErrorf("could not find localpart %q to replace with address in destinations", lp) } else { - log.Error("deprecated: destination with localpart-only key will be removed in the future, replace it with a full email address, by appending the default domain", mlog.Field("localpart", lp), mlog.Field("address", addr), mlog.Field("account", accName)) + log.Error(`deprecation warning: support for account destination addresses specified as just localpart ("username") instead of full email address will be removed in the future; update domains.conf, for each Account, for each Destination, ensure each key is an email address by appending "@" and the default domain for the account`, mlog.Field("localpart", lp), mlog.Field("address", addr), mlog.Field("account", accName)) acc.Destinations[addr] = dest delete(acc.Destinations, lp) }