Skip to content

Commit

Permalink
improve deprecation warning about localpart-only destinations a bit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mjl- committed Jul 3, 2023
1 parent c2448e5 commit 785a38c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mox-/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 785a38c

Please sign in to comment.