-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Updated autoconfig file to include POP3 and CardDAV/CalDAV #2499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, other than the display name change.
conf/mozilla-autoconfig.xml
Outdated
<displayName>PRIMARY_HOSTNAME (Mail-in-a-Box)</displayName> | ||
<displayShortName>PRIMARY_HOSTNAME</displayShortName> | ||
<displayName>%EMAILDOMAIN% (Mail-in-a-Box)</displayName> | ||
<displayShortName>%EMAILDOMAIN%</displayShortName> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use placeholders in the display name. Not all clients implement placeholders in all fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the server insert the correct value here, given that it generates the file and supports server-side placeholders anyways? This may need to be a new server-side placeholder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, see #954. Mail-in-a-Box uses a single config file for all domains. The PRIMARY_HOSTNAME
placeholder is replaced at install time, so for example if the user's primary domain is example.com
, but they also are hosting example.net
and example.org
, the PRIMARY_HOSTNAME
placeholder would be replaced with box.example.com
:
Lines 115 to 123 in 3efd425
# Create the Mozilla Auto-configuration file which is exposed via the | |
# nginx configuration at /.well-known/autoconfig/mail/config-v1.1.xml. | |
# The format of the file is documented at: | |
# https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat | |
# and https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration/FileFormat/HowTo. | |
cat conf/mozilla-autoconfig.xml \ | |
| sed "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" \ | |
> /var/lib/mailinabox/mozilla-autoconfig.xml | |
chmod a+r /var/lib/mailinabox/mozilla-autoconfig.xml |
example.net
or example.org
e-mail address, especially when they have multiple addresses, as they all show as box.example.com
in their e-mail client's UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, this change was removed in the last version? It re-appeared.
Given that this is a breaking change for some clients, could you please move this to a new PR and reference the new PR number here? Then we can investigate that issue there in the new PR, and the rest here can land already. All the rest is OK, from what I can see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing has been changed yet in regard to this. This config file is primarily for Thunderbird (hence the filename mozilla-autoconfig.xml
) and as you know, Thunderbird does support placeholders in the display name. A couple of existing config files in the ISPDB already use placeholders in the display name and your draft specification also mentions the possibility in section 3.8:
Some clients MAY also support the same placeholders for the fields
<hostname>
,<url>
,<authURL>
,<tokenURL>
,<issuer>
,<displayName>
and<displayShortName>
.
I can remove the change from this PR. However, it may be a while until this PR is merged, so there should be plenty of time to do any needed investigations... I have several pending PRs I am waiting on, including #1455 and #2473.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more small change, and it's OK.
conf/mozilla-autoconfig.xml
Outdated
<displayName>PRIMARY_HOSTNAME (Mail-in-a-Box)</displayName> | ||
<displayShortName>PRIMARY_HOSTNAME</displayShortName> | ||
<displayName>%EMAILDOMAIN% (Mail-in-a-Box)</displayName> | ||
<displayShortName>%EMAILDOMAIN%</displayShortName> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, this change was removed in the last version? It re-appeared.
Given that this is a breaking change for some clients, could you please move this to a new PR and reference the new PR number here? Then we can investigate that issue there in the new PR, and the rest here can land already. All the rest is OK, from what I can see.
Co-Authored-By: Ben Bucksch <1907525+benbucksch@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
All OK for me.
<!-- Redirects to: https://PRIMARY_HOSTNAME/cloud/remote.php/caldav/ --> | ||
<url>https://PRIMARY_HOSTNAME/.well-known/caldav</url> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a choice, whether you want to put the well-known URL in the config (advantage: more stable, disadvantage: slower, because 1 more redirect), or the actual URL. Both is OK, as long as you understand the implications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern with using the actual URL is that it could change in a future Nextcloud (or Mail in a Box) update and someone may forget to update this config file, but I would be fine with going either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I guessed so. Note that clients will save the URL once configured, so even if you update the config file, the clients will not update it, so you essentially cannot ever change the URL.
You could redirect the old to the new URL, if you need to change it, which is no worse than the redirect now.
I'm also fine either way, as long as the consequences are understood. I leave it to the maintainers of mail-in-a-box, because they'll have to maintain it.
Ready to merge. |
Updated display name to include the e-mail domain: Suggest change Thunderbird autoconfig display name to email address #954For reference, the autoconfig file format is documented here. There is also a draft specification here.