Skip to content
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

Placeholders in autoconfig file are not replaced #3171

Closed
Bad-Y opened this issue Feb 20, 2024 · 1 comment
Closed

Placeholders in autoconfig file are not replaced #3171

Bad-Y opened this issue Feb 20, 2024 · 1 comment

Comments

@Bad-Y
Copy link

Bad-Y commented Feb 20, 2024

Environment & Version

  • docker compose version v2.24.1
  • Version: master

If you are not using docker compose do not file any new issue here.
Kubernetes related issues belong to https://github.com/Mailu/helm-charts/issues
If you are not using docker compose or kubernetes, create a new thread on user support in disussions.
Non-bug reports (or bug reports that do not follow the template) are moved to disussions.

Description

in the autoconfig file https://autoconfig.mydomain.com/mail/config-v1.1.xml the placeholders are not being replaced by the actual values like the hostname variable

Replication Steps

  • Do a fresh install of mailu
  • Configure your DNS & Certificates so that mailu admin is accessible
  • go straight to the link https://autoconfig.mydomain.com/mail/config-v1.1.xml (don't forget to replace "mydomain" by your actual domain name)

Observed behaviour

XML file
<clientConfig version="1.1">
<!-- This is a placeholder that should be replaced by the actual value -->
<emailProvider id="%EMAILDOMAIN%">
<!-- This is a placeholder that should be replaced by the actual value -->
<domain>%EMAILDOMAIN%</domain>
<displayName>Email</displayName>
<displayShortName>Email</displayShortName>
<incomingServer type="imap">
<hostname>mail.mydomain.com</hostname>
<port>993</port>
<socketType>SSL</socketType>
<!-- This is a placeholder that should be replaced by the actual value -->
<username>%EMAILADDRESS%</username>
<authentication>password-cleartext</authentication>
</incomingServer>
<outgoingServer type="smtp">
<hostname>mail.mydomain.com</hostname>
<port>465</port>
<socketType>SSL</socketType>
<!-- This is a placeholder that should be replaced by the actual value -->
<username>%EMAILADDRESS%</username>
<authentication>password-cleartext</authentication>
<addThisServer>true</addThisServer>
<useGlobalPreferredServer>true</useGlobalPreferredServer>
</outgoingServer>
<documentation url="https://mail.mydomain.com/admin/client">
<descr lang="en">Configure your email client</descr>
</documentation>
</emailProvider>
</clientConfig>

Expected behaviour

XML file
<clientConfig version="1.1">
<emailProvider id="mydomain.com">
<domain>mydomain.com</domain>
<displayName>Email</displayName>
<displayShortName>Email</displayShortName>
<incomingServer type="imap">
<hostname>mail.mydomain.com</hostname>
<port>993</port>
<socketType>SSL</socketType>
<username>myusername@mydomain.com</username>
<authentication>password-cleartext</authentication>
</incomingServer>
<outgoingServer type="smtp">
<hostname>mail.mydomain.com</hostname>
<port>465</port>
<socketType>SSL</socketType>
<username>myusername@mydomain.com</username>
<authentication>password-cleartext</authentication>
<addThisServer>true</addThisServer>
<useGlobalPreferredServer>true</useGlobalPreferredServer>
</outgoingServer>
<documentation url="https://mail.mydomain.com/admin/client">
<descr lang="en">Configure your email client</descr>
</documentation>
</emailProvider>
</clientConfig>

Logs

No Logs needed

Also, the hostname in that file shouldn't be the main hostname but the current domain if found in the added hostnames in case someone has multiple domaine and each one is configured as its own and not relaying everything through the main one...

I can create a PR to fix this issue if it's validated, i guess it was introduced by the #2276 in this file /core/admin/mailu/internal/views/autoconfig.py

Thank you

@nextgens
Copy link
Contributor

This is a feature and not a bug.

Placeholders will be replaced by the MUA, see https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat#Placeholders

As for connecting to the main hostname, we do it that way to ensure there is no problem with misconfigured SSL certificates. Many people insist on running Mailu behind a proxy and they seldom configure it right (with valid certs for all the hostnames).

@nextgens nextgens closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants